From d06ef3f44d6dc19dae223ab420165369ea13cc16 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 20 五月 2026 16:29:35 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_pro
---
src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java | 46 +++++++++++++++++++++++-----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java b/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
index e5a73ac..98f0d27 100644
--- a/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
+++ b/src/main/java/com/ruoyi/device/service/impl/DeviceRepairServiceImpl.java
@@ -18,7 +18,7 @@
import com.ruoyi.device.service.IDeviceLedgerService;
import com.ruoyi.device.service.IDeviceRepairService;
import com.ruoyi.device.vo.DeviceRepairVo;
-import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.domain.R;
import com.ruoyi.measuringinstrumentledger.mapper.SparePartsMapper;
import com.ruoyi.measuringinstrumentledger.pojo.SpareParts;
import com.ruoyi.measuringinstrumentledger.pojo.SparePartsRequisitionRecord;
@@ -63,7 +63,7 @@
@Override
@Transactional(rollbackFor = Exception.class)
- public AjaxResult saveDeviceRepair(DeviceRepairDto deviceRepairDto) {
+ public R<?> saveDeviceRepair(DeviceRepairDto deviceRepairDto) {
DeviceLedger byId = deviceLedgerService.getById(deviceRepairDto.getDeviceLedgerId());
deviceRepairDto.setDeviceName(byId.getDeviceName());
deviceRepairDto.setDeviceModel(byId.getDeviceModel());
@@ -74,23 +74,23 @@
if (save) {
// 澶勭悊鍥剧墖涓婁紶
fileUtil.saveStorageAttachmentByRecordTypeAndRecordId("file", RecordTypeEnum.DEVICE_REPAIR, deviceRepairDto.getId(), deviceRepairDto.getStorageBlobDTOs());
- return AjaxResult.success();
+ return R.ok();
}
- return AjaxResult.error("淇濆瓨澶辫触");
+ return R.fail("淇濆瓨澶辫触");
}
@Override
@Transactional(rollbackFor = Exception.class)
- public AjaxResult updateDeviceRepair(DeviceRepairDto deviceRepairDto) {
+ public R<?> updateDeviceRepair(DeviceRepairDto deviceRepairDto) {
DeviceRepair oldDeviceRepair = this.getById(deviceRepairDto.getId());
if (oldDeviceRepair == null) {
- return AjaxResult.error("鎶ヤ慨璁板綍涓嶅瓨鍦�");
+ return R.fail("鎶ヤ慨璁板綍涓嶅瓨鍦�");
}
if (deviceRepairDto.getStatus() != null
&& deviceRepairDto.getStatus() == STATUS_COMPLETED
&& (oldDeviceRepair.getStatus() == null
|| oldDeviceRepair.getStatus() != STATUS_COMPLETED)) {
- return AjaxResult.error("璇峰厛鎻愪氦楠屾敹瀹℃壒锛岄獙鏀堕�氳繃鍚庢墠鍙畬缁�");
+ return R.fail("璇峰厛鎻愪氦楠屾敹瀹℃壒锛岄獙鏀堕�氳繃鍚庢墠鍙畬缁�");
}
// 澶勭悊澶囦欢浣跨敤鎯呭喌
if (CollectionUtils.isNotEmpty(deviceRepairDto.getSparePartsUseList())) {
@@ -115,7 +115,7 @@
record.setQuantity(sparePartUse.getQuantity());
sparePartsRequisitionRecordService.save(record);
} else {
- return AjaxResult.error("澶囦欢 " + spareParts.getName() + " 鏁伴噺涓嶈冻");
+ return R.fail("澶囦欢 " + spareParts.getName() + " 鏁伴噺涓嶈冻");
}
}
}
@@ -142,23 +142,23 @@
if (deviceRepairDto.getStorageBlobDTOs() != null) {
fileUtil.saveStorageAttachmentByRecordTypeAndRecordId("file", RecordTypeEnum.DEVICE_REPAIR, id, deviceRepairDto.getStorageBlobDTOs());
}
- return AjaxResult.success();
+ return R.ok();
}
- return AjaxResult.error();
+ return R.fail();
}
@Override
@Transactional(rollbackFor = Exception.class)
- public AjaxResult confirmRepair(DeviceRepairDto deviceRepairDto) {
+ public R<?> confirmRepair(DeviceRepairDto deviceRepairDto) {
DeviceRepair oldDeviceRepair = this.getById(deviceRepairDto.getId());
if (oldDeviceRepair == null) {
- return AjaxResult.error("鎶ヤ慨璁板綍涓嶅瓨鍦�");
+ return R.fail("鎶ヤ慨璁板綍涓嶅瓨鍦�");
}
if (oldDeviceRepair.getStatus() != null && oldDeviceRepair.getStatus() == STATUS_COMPLETED) {
- return AjaxResult.error("璇ユ姤淇凡瀹岀粨锛屼笉鑳介噸澶嶇‘璁ょ淮淇�");
+ return R.fail("璇ユ姤淇凡瀹岀粨锛屼笉鑳介噸澶嶇‘璁ょ淮淇�");
}
if (oldDeviceRepair.getStatus() != null && oldDeviceRepair.getStatus() == STATUS_PENDING_ACCEPTANCE) {
- return AjaxResult.error("璇ユ姤淇凡鎻愪氦楠屾敹瀹℃壒");
+ return R.fail("璇ユ姤淇凡鎻愪氦楠屾敹瀹℃壒");
}
deviceRepairDto.setStatus(STATUS_PENDING_ACCEPTANCE);
return updateDeviceRepair(deviceRepairDto);
@@ -166,25 +166,25 @@
@Override
@Transactional(rollbackFor = Exception.class)
- public AjaxResult approveRepairAcceptance(DeviceRepairDto deviceRepairDto) {
+ public R<?> approveRepairAcceptance(DeviceRepairDto deviceRepairDto) {
if (deviceRepairDto.getId() == null) {
- return AjaxResult.error("鎶ヤ慨璁板綍id涓嶈兘涓虹┖");
+ return R.fail("鎶ヤ慨璁板綍id涓嶈兘涓虹┖");
}
DeviceRepair oldDeviceRepair = this.getById(deviceRepairDto.getId());
if (oldDeviceRepair == null) {
- return AjaxResult.error("鎶ヤ慨璁板綍涓嶅瓨鍦�");
+ return R.fail("鎶ヤ慨璁板綍涓嶅瓨鍦�");
}
if (oldDeviceRepair.getStatus() == null || oldDeviceRepair.getStatus() != STATUS_PENDING_ACCEPTANCE) {
- return AjaxResult.error("璇ユ姤淇湭杩涘叆寰呴獙鏀剁姸鎬侊紝涓嶈兘瀹℃壒");
+ return R.fail("璇ユ姤淇湭杩涘叆寰呴獙鏀剁姸鎬侊紝涓嶈兘瀹℃壒");
}
if (StringUtils.isBlank(deviceRepairDto.getAcceptanceName())) {
- return AjaxResult.error("楠屾敹浜轰笉鑳戒负绌�");
+ return R.fail("楠屾敹浜轰笉鑳戒负绌�");
}
if (deviceRepairDto.getAcceptanceTime() == null) {
- return AjaxResult.error("楠屾敹鏃堕棿涓嶈兘涓虹┖");
+ return R.fail("楠屾敹鏃堕棿涓嶈兘涓虹┖");
}
if (StringUtils.isBlank(deviceRepairDto.getAcceptanceRemark())) {
- return AjaxResult.error("楠屾敹澶囨敞涓嶈兘涓虹┖");
+ return R.fail("楠屾敹澶囨敞涓嶈兘涓虹┖");
}
DeviceRepair update = new DeviceRepair();
@@ -194,9 +194,9 @@
update.setAcceptanceRemark(deviceRepairDto.getAcceptanceRemark());
update.setStatus(STATUS_COMPLETED);
if (this.updateById(update)) {
- return AjaxResult.success();
+ return R.ok();
}
- return AjaxResult.error("楠屾敹瀹℃壒澶辫触");
+ return R.fail("楠屾敹瀹℃壒澶辫触");
}
@Override
--
Gitblit v1.9.3