From 47d31d92a762cda66ff40de2f6cb111a408b146f Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 05 六月 2026 11:28:17 +0800
Subject: [PATCH] 不良品审核
---
basic-server/src/main/java/com/ruoyi/basic/controller/QualityDefectiveProductController.java | 5 +----
basic-server/src/main/java/com/ruoyi/basic/dto/DefectiveProductAuditDto.java | 4 ++--
basic-server/src/main/java/com/ruoyi/basic/service/impl/QualityDefectiveProductServiceImpl.java | 13 +++++++------
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/basic-server/src/main/java/com/ruoyi/basic/controller/QualityDefectiveProductController.java b/basic-server/src/main/java/com/ruoyi/basic/controller/QualityDefectiveProductController.java
index fc1800f..465ced2 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/controller/QualityDefectiveProductController.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/controller/QualityDefectiveProductController.java
@@ -81,10 +81,7 @@
@ApiOperation(value = "鏌ヨ涓嶈壇鍝佸鏍稿垪琛�")
@GetMapping("/audit/page")
public Result<IPage<QualityDefectiveProduct>> pageDefectiveProductAudit(Page<QualityDefectiveProduct> page, QualityDefectiveProduct query) {
- // 瀹℃牳鍒楄〃榛樿鍙煡璇㈠緟瀹℃牳鐘舵��
- if (query.getAuditStatus() == null) {
- query.setAuditStatus(0);
- }
+ // 瀹℃牳鍒楄〃鏀寔鎸夊鏍哥姸鎬佺瓫閫夛紝涓嶄紶鍒欐煡璇㈡墍鏈夌姸鎬�
return Result.success(defectiveProductService.selectPage(page, query));
}
diff --git a/basic-server/src/main/java/com/ruoyi/basic/dto/DefectiveProductAuditDto.java b/basic-server/src/main/java/com/ruoyi/basic/dto/DefectiveProductAuditDto.java
index c9165ae..ff73d35 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/dto/DefectiveProductAuditDto.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/dto/DefectiveProductAuditDto.java
@@ -12,9 +12,9 @@
@ApiModelProperty(value = "涓婚敭ID")
private Long id;
- @ApiModelProperty(value = "瀹℃牳鐘舵�侊細0-寰呭鏍革紝1-宸插鏍�")
+ @ApiModelProperty(value = "瀹℃牳鐘舵�侊細0-寰呭鏍革紝1-瀹℃牳閫氳繃锛�2-椹冲洖")
private Integer auditStatus;
@ApiModelProperty(value = "瀹℃牳鎰忚")
private String auditRemark;
-}
+}
\ No newline at end of file
diff --git a/basic-server/src/main/java/com/ruoyi/basic/service/impl/QualityDefectiveProductServiceImpl.java b/basic-server/src/main/java/com/ruoyi/basic/service/impl/QualityDefectiveProductServiceImpl.java
index c31098c..c85cc28 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/service/impl/QualityDefectiveProductServiceImpl.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/service/impl/QualityDefectiveProductServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.basic.service.impl;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -104,13 +105,13 @@
throw new RuntimeException("涓嶈壇鍝佷俊鎭笉瀛樺湪");
}
- entity.setAuditStatus(auditDto.getAuditStatus());
- entity.setAuditRemark(auditDto.getAuditRemark());
- entity.setAuditBy(SecurityUtils.getUsername());
- entity.setAuditTime(LocalDateTime.now());
- entity.setUpdateBy(SecurityUtils.getUsername());
- entity.setUpdateTime(LocalDateTime.now());
+ String username = SecurityUtils.getUsername();
+ LocalDateTime now = LocalDateTime.now();
+ entity.setAuditBy(username);
+ entity.setAuditRemark(auditDto.getAuditRemark());
+ entity.setAuditStatus(auditDto.getAuditStatus());
+ entity.setAuditTime(now);
return defectiveProductMapper.updateById(entity);
}
--
Gitblit v1.9.3