From 260dd6fe156265832544715192ce1491e9c2afd6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 26 六月 2026 13:41:13 +0800
Subject: [PATCH] fix(stock): 解决库存管理中的重复键异常问题 - 在采购台账服务中添加净合同金额字段设置 - 在销售台账服务中添加净合同金额字段设置 - 在入库记录服务中为库存插入操作添加重复键异常处理 - 在入库记录服务中为非库存插入操作添加重复键异常处理 - 在库存服务中为库存插入操作添加重复键异常处理 - 统一处理数据库唯一键约束冲突,避免系统错误
---
src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceFileController.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceFileController.java b/src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceFileController.java
index 2290e5b..9032852 100644
--- a/src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceFileController.java
+++ b/src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceFileController.java
@@ -6,7 +6,7 @@
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.framework.web.domain.R;
+import com.ruoyi.framework.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
@@ -34,24 +34,24 @@
@PostMapping("/upload")
@Operation(summary = "鍞悗鏈嶅姟-鏂囦欢涓婁紶")
@Log(title = "鍞悗鏈嶅姟-鏂囦欢涓婁紶", businessType = BusinessType.INSERT)
- public R<?> fileUpload(@RequestParam("file") MultipartFile file,
+ public AjaxResult fileUpload(@RequestParam("file") MultipartFile file,
@RequestParam("id") Long afterSalesServiceId) {
afterSalesServiceFileService.fileUpload(file, afterSalesServiceId);
- return R.ok(null, "涓婁紶鎴愬姛");
+ return AjaxResult.success("涓婁紶鎴愬姛");
}
@GetMapping("/listPage")
@Operation(summary = "鍞悗澶勭悊-鍞悗闄勪欢鍒楄〃")
@Log(title = "鍞悗澶勭悊-鍞悗闄勪欢鍒楄〃", businessType = BusinessType.OTHER)
- public R<?> fileList(Page<AfterSalesServiceFile> page, Long afterSalesServiceId) {
- return R.ok(afterSalesServiceFileService.fileList(page, afterSalesServiceId));
+ public AjaxResult fileList(Page<AfterSalesServiceFile> page, Long afterSalesServiceId) {
+ return AjaxResult.success(afterSalesServiceFileService.fileList(page, afterSalesServiceId));
}
@DeleteMapping("/del/{fileId}")
@Operation(summary = "鍞悗澶勭悊-鍒犻櫎闄勪欢")
@Log(title = "鍞悗澶勭悊-鍒犻櫎闄勪欢", businessType = BusinessType.DELETE)
- public R<?> delFile(@PathVariable Long fileId) {
+ public AjaxResult delFile(@PathVariable Long fileId) {
afterSalesServiceFileService.delFile(fileId);
- return R.ok(null, "鍒犻櫎鎴愬姛!");
+ return AjaxResult.success("鍒犻櫎鎴愬姛!");
}
}
--
Gitblit v1.9.3