From 2383a74ccc4027e3d7cf2a829e43328af2e0e388 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期六, 19 四月 2025 16:45:40 +0800
Subject: [PATCH] 实验结果汇报,jianyanbaogao
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java | 105 ++++++++++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TExperimentResultReportMapper.java | 14 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TResultWorkEvaluateController.java | 4
ruoyi-system/src/main/java/com/ruoyi/system/vo/TInspectionReportVO.java | 13 +
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml | 28 ++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInspectionReportMapper.java | 14 +
ruoyi-system/src/main/java/com/ruoyi/system/query/TInspectionReportQuery.java | 26 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TExperimentResultReportServiceImpl.java | 19 +
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml | 28 ++
ruoyi-system/src/main/java/com/ruoyi/system/query/TExperimentResultReportQuery.java | 25 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java | 147 ++++++++++++++
ruoyi-system/src/main/java/com/ruoyi/system/service/TExperimentResultReportService.java | 9
ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml | 2
/dev/null | 16 -
ruoyi-system/src/main/java/com/ruoyi/system/service/TInspectionReportService.java | 9
ruoyi-system/src/main/java/com/ruoyi/system/model/TResultWorkEvaluate.java | 6
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TResultWorkEvaluateMapper.java | 16 +
ruoyi-system/src/main/java/com/ruoyi/system/dto/TInspectionReportDTO.java | 13 +
ruoyi-system/src/main/java/com/ruoyi/system/service/TResultWorkEvaluateService.java | 4
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInspectionReportServiceImpl.java | 17 +
ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentResultReportVO.java | 47 ++++
ruoyi-system/src/main/java/com/ruoyi/system/dto/TExperimentResultReportDTO.java | 18 +
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTesterWorkEvaluateServiceImpl.java | 8
23 files changed, 554 insertions(+), 34 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TChemistWorkEvaluateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TChemistWorkEvaluateController.java
deleted file mode 100644
index 09ba20f..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TChemistWorkEvaluateController.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.ruoyi.web.controller.api;
-
-
-import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * 化验师工作评定 前端控制器
- * </p>
- *
- * @author xiaochen
- * @since 2025-04-08
- */
-@Api(tags = "化验师工作评定")
-@RestController
-@RequestMapping("/t-chemist-work-evaluate")
-public class TChemistWorkEvaluateController {
-
-}
-
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java
index ab5039a..942ce28 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TExperimentResultReportController.java
@@ -1,9 +1,29 @@
package com.ruoyi.web.controller.api;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.dto.TExperimentResultReportDTO;
+import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.model.TExperimentScheme;
+import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.model.TResultWorkEvaluate;
+import com.ruoyi.system.query.TExperimentResultReportQuery;
+import com.ruoyi.system.service.*;
+import com.ruoyi.system.vo.TExperimentResultReportVO;
import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
/**
* <p>
@@ -15,8 +35,129 @@
*/
@Api(tags = "实验结果汇报")
@RestController
-@RequestMapping("/t-experiment-result-report")
+@RequestMapping("")
public class TExperimentResultReportController {
+ private final TExperimentResultReportService experimentResultReportService;
+ private final TokenService tokenService;
+ private final ISysUserService sysUserService;
+ private final TResultWorkEvaluateService resultWorkEvaluateService;
+ private final TExperimentSchemeService experimentSchemeService;
+ private final TInspectionReportService inspectionReportService;
+ @Autowired
+ public TExperimentResultReportController(TExperimentResultReportService experimentResultReportService, TokenService tokenService, ISysUserService sysUserService, TResultWorkEvaluateService resultWorkEvaluateService, TExperimentSchemeService experimentSchemeService, TInspectionReportService inspectionReportService) {
+ this.experimentResultReportService = experimentResultReportService;
+ this.tokenService = tokenService;
+ this.sysUserService = sysUserService;
+ this.resultWorkEvaluateService = resultWorkEvaluateService;
+ this.experimentSchemeService = experimentSchemeService;
+ this.inspectionReportService = inspectionReportService;
+ }
+
+ /**
+ * 获取实验结果汇报管理列表
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:list')")
+ @ApiOperation(value = "获取实验结果汇报分页列表")
+ @PostMapping(value = "/api/t-experiment-result-report/pageList")
+ public R<PageInfo<TExperimentResultReportVO>> pageList(@RequestBody String param) {
+ TExperimentResultReportQuery query = JSON.parseObject(param, TExperimentResultReportQuery.class);
+ return R.ok(experimentResultReportService.pageList(query));
+ }
+
+ /**
+ * 添加实验结果汇报管理
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:add')")
+ @Log(title = "实验结果汇报信息-新增实验结果汇报", businessType = BusinessType.INSERT)
+ @ApiOperation(value = "添加实验结果汇报",response = TExperimentResultReportDTO.class)
+ @PostMapping(value = "/api/t-experiment-result-report/add")
+ public R<Boolean> add(@RequestBody String param) {
+ TExperimentResultReportDTO dto = JSON.parseObject(param,TExperimentResultReportDTO.class);
+ experimentResultReportService.save(dto);
+ // 添加实验结果工作评价
+ List<TResultWorkEvaluate> resultWorkEvaluates = dto.getResultWorkEvaluates();
+ for (TResultWorkEvaluate resultWorkEvaluate : resultWorkEvaluates) {
+ resultWorkEvaluate.setResultReportId(dto.getId());
+ }
+ resultWorkEvaluateService.saveBatch(resultWorkEvaluates);
+ return R.ok();
+ }
+
+ /**
+ * 修改实验结果汇报
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
+ @Log(title = "实验结果汇报信息-修改实验结果汇报", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "修改实验结果汇报")
+ @PostMapping(value = "/api/t-experiment-result-report/update")
+ public R<Boolean> update(@RequestBody String param) {
+ TExperimentResultReportDTO dto = JSON.parseObject(param,TExperimentResultReportDTO.class);
+ experimentResultReportService.updateById(dto);
+ // 修改实验结果工作评价
+ List<TResultWorkEvaluate> resultWorkEvaluates = dto.getResultWorkEvaluates();
+ resultWorkEvaluateService.updateBatchById(resultWorkEvaluates);
+ return R.ok();
+ }
+
+ /**
+ * 修改实验结果汇报
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:edit')")
+ @Log(title = "实验结果汇报信息-评定工艺工程师实验", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "评定工艺工程师实验")
+ @PostMapping(value = "/api/t-experiment-result-report/evaluateProcess")
+ public R<Boolean> evaluateProcess(@RequestBody String param) {
+ TResultWorkEvaluate resultWorkEvaluate = JSON.parseObject(param,TResultWorkEvaluate.class);
+ resultWorkEvaluateService.save(resultWorkEvaluate);
+ return R.ok();
+ }
+
+ /**
+ * 查看实验结果汇报详情
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:detail')")
+ @ApiOperation(value = "查看实验结果汇报详情")
+ @GetMapping(value = "/open/t-experiment-result-report/getDetailById")
+ public R<TExperimentResultReportVO> getDetailById(@RequestParam String id) {
+ TExperimentResultReport experimentResultReport = experimentResultReportService.getById(id);
+ TExperimentResultReportVO experimentResultReportVO = new TExperimentResultReportVO();
+ BeanUtils.copyProperties(experimentResultReport, experimentResultReportVO);
+ // 获取评分列表
+ List<TResultWorkEvaluate> resultWorkEvaluates = resultWorkEvaluateService.list(Wrappers.lambdaQuery(TResultWorkEvaluate.class)
+ .eq(TResultWorkEvaluate::getResultReportId, id));
+ experimentResultReportVO.setResultWorkEvaluates(resultWorkEvaluates);
+ // 查询实验结果列表
+ List<TExperimentScheme> experimentSchemes = experimentSchemeService.list(Wrappers.lambdaQuery(TExperimentScheme.class)
+ .eq(TExperimentScheme::getDispatchId, experimentResultReport.getDispatchId()));
+ experimentResultReportVO.setExperimentSchemes(experimentSchemes);
+ List<TInspectionReport> inspectionReports = inspectionReportService.list(Wrappers.lambdaQuery(TInspectionReport.class)
+ .eq(TInspectionReport::getDispatchId, experimentResultReport.getDispatchId()));
+ experimentResultReportVO.setInspectionReports(inspectionReports);
+ return R.ok(experimentResultReportVO);
+ }
+
+ /**
+ * 删除实验结果汇报
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
+ @Log(title = "实验结果汇报信息-删除实验结果汇报", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "删除实验结果汇报")
+ @DeleteMapping(value = "/open/t-experiment-result-report/deleteById")
+ public R<Boolean> deleteById(@RequestParam String id) {
+ return R.ok(experimentResultReportService.removeById(id));
+ }
+
+ /**
+ * 批量删除实验结果汇报
+ */
+ @PreAuthorize("@ss.hasPermi('system:experimentResultReport:delete')")
+ @Log(title = "实验结果汇报信息-删除实验结果汇报", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "批量删除实验结果汇报")
+ @DeleteMapping(value = "/open/t-experiment-result-report/deleteByIds")
+ public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
+ return R.ok(experimentResultReportService.removeByIds(ids));
+ }
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java
index abcb6f3..629df25 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInspectionReportController.java
@@ -1,9 +1,26 @@
package com.ruoyi.web.controller.api;
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.dto.TInspectionReportDTO;
+import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.query.TInspectionReportQuery;
+import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.system.service.TInspectionReportService;
+import com.ruoyi.system.vo.TInspectionReportVO;
import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
/**
* <p>
@@ -15,8 +32,90 @@
*/
@Api(tags = "检验报告管理")
@RestController
-@RequestMapping("/t-inspection-report")
+@RequestMapping("")
public class TInspectionReportController {
+ private final TInspectionReportService inspectionReportService;
+ private final TokenService tokenService;
+ private final ISysUserService sysUserService;
+ @Autowired
+ public TInspectionReportController(TInspectionReportService inspectionReportService, TokenService tokenService, ISysUserService sysUserService) {
+ this.inspectionReportService = inspectionReportService;
+ this.tokenService = tokenService;
+ this.sysUserService = sysUserService;
+ }
+
+ /**
+ * 获取检验报告管理列表
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:list')")
+ @ApiOperation(value = "获取检验报告分页列表")
+ @PostMapping(value = "/api/t-inspection-report/pageList")
+ public R<PageInfo<TInspectionReportVO>> pageList(@RequestBody String param) {
+ TInspectionReportQuery query = JSON.parseObject(param, TInspectionReportQuery.class);
+ return R.ok(inspectionReportService.pageList(query));
+ }
+
+ /**
+ * 添加检验报告管理
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:add')")
+ @Log(title = "检验报告信息-新增检验报告", businessType = BusinessType.INSERT)
+ @ApiOperation(value = "添加检验报告",response = TInspectionReportDTO.class)
+ @PostMapping(value = "/api/t-inspection-report/add")
+ public R<Boolean> add(@RequestBody String param) {
+ TInspectionReportDTO dto = JSON.parseObject(param,TInspectionReportDTO.class);
+ inspectionReportService.save(dto);
+ return R.ok();
+ }
+
+ /**
+ * 修改检验报告
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:edit')")
+ @Log(title = "检验报告信息-修改检验报告", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "修改检验报告")
+ @PostMapping(value = "/api/t-inspection-report/update")
+ public R<Boolean> update(@RequestBody String param) {
+ TInspectionReportDTO dto = JSON.parseObject(param,TInspectionReportDTO.class);
+ inspectionReportService.updateById(dto);
+ return R.ok();
+ }
+
+ /**
+ * 查看检验报告详情
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:detail')")
+ @ApiOperation(value = "查看检验报告详情")
+ @GetMapping(value = "/open/t-inspection-report/getDetailById")
+ public R<TInspectionReportVO> getDetailById(@RequestParam String id) {
+ TInspectionReport inspectionReport = inspectionReportService.getById(id);
+ TInspectionReportVO inspectionReportVO = new TInspectionReportVO();
+ BeanUtils.copyProperties(inspectionReport, inspectionReportVO);
+ return R.ok(inspectionReportVO);
+ }
+
+ /**
+ * 删除检验报告
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
+ @Log(title = "检验报告信息-删除检验报告", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "删除检验报告")
+ @DeleteMapping(value = "/open/t-inspection-report/deleteById")
+ public R<Boolean> deleteById(@RequestParam String id) {
+ return R.ok(inspectionReportService.removeById(id));
+ }
+
+ /**
+ * 批量删除检验报告
+ */
+ @PreAuthorize("@ss.hasPermi('system:inspectionReport:delete')")
+ @Log(title = "检验报告信息-删除检验报告", businessType = BusinessType.DELETE)
+ @ApiOperation(value = "批量删除检验报告")
+ @DeleteMapping(value = "/open/t-inspection-report/deleteByIds")
+ public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
+ return R.ok(inspectionReportService.removeByIds(ids));
+ }
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTesterWorkEvaluateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TResultWorkEvaluateController.java
similarity index 80%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTesterWorkEvaluateController.java
rename to ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TResultWorkEvaluateController.java
index 6c2ee1f..ee66470 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTesterWorkEvaluateController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TResultWorkEvaluateController.java
@@ -15,8 +15,8 @@
*/
@Api(tags = "实验员工作评定管理")
@RestController
-@RequestMapping("/t-tester-work-evaluate")
-public class TTesterWorkEvaluateController {
+@RequestMapping("/t-result-work-evaluate")
+public class TResultWorkEvaluateController {
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/TExperimentResultReportDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TExperimentResultReportDTO.java
new file mode 100644
index 0000000..bad58c3
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TExperimentResultReportDTO.java
@@ -0,0 +1,18 @@
+package com.ruoyi.system.dto;
+
+import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.model.TResultWorkEvaluate;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value = "实验结果汇报新增编辑DTO")
+public class TExperimentResultReportDTO extends TExperimentResultReport {
+
+ @ApiModelProperty(value = "评分列表")
+ private List<TResultWorkEvaluate> resultWorkEvaluates;
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/TInspectionReportDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TInspectionReportDTO.java
new file mode 100644
index 0000000..a1b9e70
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TInspectionReportDTO.java
@@ -0,0 +1,13 @@
+package com.ruoyi.system.dto;
+
+import com.ruoyi.system.model.TInspectionReport;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "检验报告新增编辑DTO")
+public class TInspectionReportDTO extends TInspectionReport {
+
+
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TExperimentResultReportMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TExperimentResultReportMapper.java
index 0a5edbc..e539278 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TExperimentResultReportMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TExperimentResultReportMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.query.TExperimentResultReportQuery;
+import com.ruoyi.system.vo.TExperimentResultReportVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* <p>
@@ -13,4 +19,12 @@
*/
public interface TExperimentResultReportMapper extends BaseMapper<TExperimentResultReport> {
+ /**
+ * 分页查询实验结果汇报
+ *
+ * @param query 查询条件
+ * @return 实验结果汇报分页列表
+ */
+ List<TExperimentResultReportVO> pageList(@Param("query") TExperimentResultReportQuery query, @Param("pageInfo")PageInfo<TExperimentResultReportVO> pageInfo);
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInspectionReportMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInspectionReportMapper.java
index 8c8822e..358f975 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInspectionReportMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TInspectionReportMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.query.TInspectionReportQuery;
+import com.ruoyi.system.vo.TInspectionReportVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* <p>
@@ -13,4 +19,12 @@
*/
public interface TInspectionReportMapper extends BaseMapper<TInspectionReport> {
+ /**
+ * 分页查询检验报告
+ * @param query
+ * @param pageInfo
+ * @return
+ */
+ List<TInspectionReportVO> pageList(@Param("query") TInspectionReportQuery query, @Param("pageInfo")PageInfo<TInspectionReportVO> pageInfo);
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TResultWorkEvaluateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TResultWorkEvaluateMapper.java
new file mode 100644
index 0000000..b345a64
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TResultWorkEvaluateMapper.java
@@ -0,0 +1,16 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.model.TResultWorkEvaluate;
+
+/**
+ * <p>
+ * 实验员工作评定 Mapper 接口
+ * </p>
+ *
+ * @author xiaochen
+ * @since 2025-04-08
+ */
+public interface TResultWorkEvaluateMapper extends BaseMapper<TResultWorkEvaluate> {
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTesterWorkEvaluateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTesterWorkEvaluateMapper.java
deleted file mode 100644
index 6a3d0b4..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTesterWorkEvaluateMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.system.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.system.model.TTesterWorkEvaluate;
-
-/**
- * <p>
- * 实验员工作评定 Mapper 接口
- * </p>
- *
- * @author xiaochen
- * @since 2025-04-08
- */
-public interface TTesterWorkEvaluateMapper extends BaseMapper<TTesterWorkEvaluate> {
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TTesterWorkEvaluate.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TResultWorkEvaluate.java
similarity index 93%
rename from ruoyi-system/src/main/java/com/ruoyi/system/model/TTesterWorkEvaluate.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/model/TResultWorkEvaluate.java
index 18829f5..18bde3f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TTesterWorkEvaluate.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TResultWorkEvaluate.java
@@ -21,9 +21,9 @@
*/
@Data
@EqualsAndHashCode(callSuper = false)
-@TableName("t_tester_work_evaluate")
-@ApiModel(value="TTesterWorkEvaluate对象", description="实验员工作评定")
-public class TTesterWorkEvaluate extends BaseModel {
+@TableName("t_result_work_evaluate")
+@ApiModel(value="TResultWorkEvaluate对象", description="实验员工作评定")
+public class TResultWorkEvaluate extends BaseModel {
private static final long serialVersionUID = 1L;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/query/TExperimentResultReportQuery.java b/ruoyi-system/src/main/java/com/ruoyi/system/query/TExperimentResultReportQuery.java
new file mode 100644
index 0000000..2134a64
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/query/TExperimentResultReportQuery.java
@@ -0,0 +1,25 @@
+package com.ruoyi.system.query;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.ruoyi.common.core.domain.model.TimeRangeQueryBody;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "实验结果汇报查询条件query")
+public class TExperimentResultReportQuery extends TimeRangeQueryBody {
+
+ @ApiModelProperty(value = "项目课题方案")
+ private String projectName;
+
+ @ApiModelProperty(value = "实验编号")
+ private String experimentCode;
+
+ @ApiModelProperty(value = "实验名称")
+ private String experimentName;
+
+ @ApiModelProperty(value = "状态 -1=草稿箱 1=待提交 2=待评定 3=已评定 4=已封存")
+ private Integer status;
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/query/TInspectionReportQuery.java b/ruoyi-system/src/main/java/com/ruoyi/system/query/TInspectionReportQuery.java
new file mode 100644
index 0000000..41c0fc6
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/query/TInspectionReportQuery.java
@@ -0,0 +1,26 @@
+package com.ruoyi.system.query;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.ruoyi.common.core.domain.model.TimeRangeQueryBody;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "检验报告查询参数query")
+public class TInspectionReportQuery extends TimeRangeQueryBody {
+
+ @ApiModelProperty(value = "项目课题方案")
+ private String projectName;
+
+ @ApiModelProperty(value = "实验编号")
+ private String experimentCode;
+
+ @ApiModelProperty(value = "实验名称")
+ private String experimentName;
+
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ @ApiModelProperty(value = "状态 -1=草稿箱 1=待提交 2=已提交")
+ private Integer status;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TExperimentResultReportService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TExperimentResultReportService.java
index 666fb33..6e720b1 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TExperimentResultReportService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TExperimentResultReportService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.query.TExperimentResultReportQuery;
+import com.ruoyi.system.vo.TExperimentResultReportVO;
/**
* <p>
@@ -13,4 +16,10 @@
*/
public interface TExperimentResultReportService extends IService<TExperimentResultReport> {
+ /**
+ * 获取实验结果汇报分页列表
+ * @param query
+ * @return
+ */
+ PageInfo<TExperimentResultReportVO> pageList(TExperimentResultReportQuery query);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TInspectionReportService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TInspectionReportService.java
index 09c9a56..aeae354 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TInspectionReportService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TInspectionReportService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.query.TInspectionReportQuery;
+import com.ruoyi.system.vo.TInspectionReportVO;
/**
* <p>
@@ -13,4 +16,10 @@
*/
public interface TInspectionReportService extends IService<TInspectionReport> {
+ /**
+ * 获取检验报告分页列表
+ * @param query
+ * @return
+ */
+ PageInfo<TInspectionReportVO> pageList(TInspectionReportQuery query);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TTesterWorkEvaluateService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TResultWorkEvaluateService.java
similarity index 60%
rename from ruoyi-system/src/main/java/com/ruoyi/system/service/TTesterWorkEvaluateService.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/TResultWorkEvaluateService.java
index b2a98c6..8b085d4 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TTesterWorkEvaluateService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TResultWorkEvaluateService.java
@@ -1,7 +1,7 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.system.model.TTesterWorkEvaluate;
+import com.ruoyi.system.model.TResultWorkEvaluate;
/**
* <p>
@@ -11,6 +11,6 @@
* @author xiaochen
* @since 2025-04-08
*/
-public interface TTesterWorkEvaluateService extends IService<TTesterWorkEvaluate> {
+public interface TResultWorkEvaluateService extends IService<TResultWorkEvaluate> {
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TExperimentResultReportServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TExperimentResultReportServiceImpl.java
index 140d3ac..b3e6307 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TExperimentResultReportServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TExperimentResultReportServiceImpl.java
@@ -1,10 +1,21 @@
package com.ruoyi.system.service.impl;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.TExperimentResultReportMapper;
+import com.ruoyi.system.model.TExperimentDispatchParticipants;
import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.query.TExperimentResultReportQuery;
import com.ruoyi.system.service.TExperimentResultReportService;
+import com.ruoyi.system.vo.TExperimentDispatchVO;
+import com.ruoyi.system.vo.TExperimentResultReportVO;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
/**
* <p>
@@ -17,4 +28,12 @@
@Service
public class TExperimentResultReportServiceImpl extends ServiceImpl<TExperimentResultReportMapper, TExperimentResultReport> implements TExperimentResultReportService {
+ @Override
+ public PageInfo<TExperimentResultReportVO> pageList(TExperimentResultReportQuery query) {
+ PageInfo<TExperimentResultReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
+ List<TExperimentResultReportVO> list = this.baseMapper.pageList(query,pageInfo);
+ // TODO 处理实验人员信息及是否评定
+ pageInfo.setRecords(list);
+ return pageInfo;
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInspectionReportServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInspectionReportServiceImpl.java
index 8f15c42..cb6a65b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInspectionReportServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TInspectionReportServiceImpl.java
@@ -1,10 +1,20 @@
package com.ruoyi.system.service.impl;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.mapper.TInspectionReportMapper;
import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.model.TProjectTeamStaff;
+import com.ruoyi.system.query.TInspectionReportQuery;
import com.ruoyi.system.service.TInspectionReportService;
+import com.ruoyi.system.vo.TInspectionReportVO;
+import com.ruoyi.system.vo.TProjectTeamVO;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
/**
* <p>
@@ -17,4 +27,11 @@
@Service
public class TInspectionReportServiceImpl extends ServiceImpl<TInspectionReportMapper, TInspectionReport> implements TInspectionReportService {
+ @Override
+ public PageInfo<TInspectionReportVO> pageList(TInspectionReportQuery query) {
+ PageInfo<TInspectionReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
+ List<TInspectionReportVO> list = this.baseMapper.pageList(query,pageInfo);
+ pageInfo.setRecords(list);
+ return pageInfo;
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTesterWorkEvaluateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTesterWorkEvaluateServiceImpl.java
index 297230d..599e83a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTesterWorkEvaluateServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTesterWorkEvaluateServiceImpl.java
@@ -1,9 +1,9 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.system.mapper.TTesterWorkEvaluateMapper;
-import com.ruoyi.system.model.TTesterWorkEvaluate;
-import com.ruoyi.system.service.TTesterWorkEvaluateService;
+import com.ruoyi.system.mapper.TResultWorkEvaluateMapper;
+import com.ruoyi.system.model.TResultWorkEvaluate;
+import com.ruoyi.system.service.TResultWorkEvaluateService;
import org.springframework.stereotype.Service;
/**
@@ -15,6 +15,6 @@
* @since 2025-04-08
*/
@Service
-public class TTesterWorkEvaluateServiceImpl extends ServiceImpl<TTesterWorkEvaluateMapper, TTesterWorkEvaluate> implements TTesterWorkEvaluateService {
+public class TTesterWorkEvaluateServiceImpl extends ServiceImpl<TResultWorkEvaluateMapper, TResultWorkEvaluate> implements TResultWorkEvaluateService {
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentResultReportVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentResultReportVO.java
new file mode 100644
index 0000000..8e342d8
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TExperimentResultReportVO.java
@@ -0,0 +1,47 @@
+package com.ruoyi.system.vo;
+
+import com.ruoyi.system.model.TExperimentResultReport;
+import com.ruoyi.system.model.TExperimentScheme;
+import com.ruoyi.system.model.TInspectionReport;
+import com.ruoyi.system.model.TResultWorkEvaluate;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value = "实验结果汇报VO")
+public class TExperimentResultReportVO extends TExperimentResultReport {
+
+ @ApiModelProperty(value = "评分列表")
+ private List<TResultWorkEvaluate> resultWorkEvaluates;
+ @ApiModelProperty(value = "实验结果")
+ private List<TExperimentScheme> experimentSchemes;
+ @ApiModelProperty(value = "检验结果报告")
+ private List<TInspectionReport> InspectionReports;
+
+ @ApiModelProperty(value = "项目课题方案")
+ private String projectName;
+
+ @ApiModelProperty(value = "实验编号")
+ private String experimentCode;
+
+ @ApiModelProperty(value = "实验名称")
+ private String experimentName;
+
+ @ApiModelProperty(value = "工艺工程师姓名")
+ private String processEngineerName;
+
+ @ApiModelProperty(value = "化验师名称")
+ private String laboratoryChemistName;
+
+ @ApiModelProperty(value = "化验师是否评定")
+ private Integer laboratoryChemistEvaluate;
+
+ @ApiModelProperty(value = "实验员姓名")
+ private String experimenterName;
+
+ @ApiModelProperty(value = "实验员是否评定")
+ private Integer experimenterEvaluate;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInspectionReportVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInspectionReportVO.java
new file mode 100644
index 0000000..5aa02bd
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/vo/TInspectionReportVO.java
@@ -0,0 +1,13 @@
+package com.ruoyi.system.vo;
+
+import com.ruoyi.system.model.TInspectionReport;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "检验报告VO")
+public class TInspectionReportVO extends TInspectionReport {
+
+
+
+}
diff --git a/ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
index 83b2540..eaf53b1 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
@@ -27,5 +27,33 @@
<sql id="Base_Column_List">
id, dispatch_id, experiment_result, status, evaluate_one, evaluate_two, evaluate_three, evaluate_four, evaluate_five, evaluate_six, evaluate_person_id, evaluate_time, create_time, update_time, create_by, update_by, disabled
</sql>
+ <select id="pageList" resultType="com.ruoyi.system.vo.TExperimentResultReportVO">
+ select terr.id, terr.dispatch_id, terr.experiment_result, terr.status, terr.evaluate_one, terr.evaluate_two, terr.evaluate_three,
+ terr.evaluate_four, terr.evaluate_five, terr.evaluate_six, terr.evaluate_person_id, terr.evaluate_time, terr.create_time,
+ terr.update_time, terr.create_by, terr.update_by, terr.disabled, tpp.project_name AS projectName,
+ ted.experiment_code AS experimentCode, ted.experiment_name AS experimentName
+ from t_experiment_result_report terr
+ left join t_experiment_dispatch ted on terr.dispatch_id = ted.id
+ left join t_project_proposal tpp on ted.project_id = tpp.id
+ <where>
+ <if test="query.projectName != null and query.projectName != ''">
+ and tpp.project_name like concat('%', #{query.projectName}, '%')
+ </if>
+ <if test="query.experimentCode != null and query.experimentCode != ''">
+ and ted.experiment_code like concat('%', #{query.experimentCode}, '%')
+ </if>
+ <if test="query.experimentName != null and query.experimentName != ''">
+ and ted.experiment_name like concat('%', #{query.experimentName}, '%')
+ </if>
+ <if test="query.status != null">
+ and terr.status = #{query.status}
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND terr.create_time BETWEEN #{query.startTime} AND #{query.endTime}
+ </if>
+ AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY terr.create_time DESC
+ </select>
</mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
index 275950f..43d1c8c 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
@@ -20,5 +20,33 @@
<sql id="Base_Column_List">
id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled
</sql>
+ <select id="pageList" resultType="com.ruoyi.system.vo.TInspectionReportVO">
+ select id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled
+ from t_inspection_report tir
+ left join t_experiment_dispatch ted on ted.id = tir.dispatch_id
+ left join t_project_proposal tpp on tpp.id = ted.project_id
+ <where>
+ <if test="query.projectName != null and query.projectName != ''">
+ and tpp.project_name like concat('%', #{query.projectName}, '%')
+ </if>
+ <if test="query.experimentName != null and query.experimentName != ''">
+ and ted.experiment_name like concat('%', #{query.experimentName}, '%')
+ </if>
+ <if test="query.experimentCode != null and query.experimentCode !=''">
+ and ted.experiment_code like concat('%', #{query.experimentCode}, '%')
+ </if>
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+ AND tir.create_time BETWEEN #{query.startTime} AND #{query.endTime}
+ </if>
+ <if test="query.status != null">
+ and tir.status = #{query.status}
+ </if>
+ <if test="query.createBy != null and query.createBy != ''">
+ and tir.create_by = #{query.createBy}
+ </if>
+ and tir.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY tir.create_time DESC
+ </select>
</mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TTesterWorkEvaluateMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
similarity index 96%
rename from ruoyi-system/src/main/resources/mapper/system/TTesterWorkEvaluateMapper.xml
rename to ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
index 50c82aa..71c32ed 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TTesterWorkEvaluateMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
@@ -1,6 +1,6 @@
<?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="com.ruoyi.system.mapper.TTesterWorkEvaluateMapper">
+<mapper namespace="com.ruoyi.system.mapper.TResultWorkEvaluateMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TTesterWorkEvaluate">
--
Gitblit v1.7.1