From 9e31a333ceb9e6a51d18c808eabffd8cebc8cb4e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 五月 2026 11:35:49 +0800
Subject: [PATCH] refactor(core): 删除销售台账及相关代码中与发票和待付款金额关联的逻辑
---
src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java b/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
index 9ca9b3a..f707b5b 100644
--- a/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
+++ b/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
@@ -11,6 +11,7 @@
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.sales.dto.ShippingInfoDto;
import com.ruoyi.sales.mapper.ShippingInfoMapper;
@@ -44,16 +45,16 @@
@GetMapping("/listPage")
@Operation(summary = "鍙戣揣淇℃伅鍒楄〃")
- public R<?> listPage(Page page, ShippingInfo req) {
+ public AjaxResult listPage(Page page, ShippingInfo req) {
IPage<ShippingInfoDto> listPage = shippingInfoService.listPage(page,req);
- return R.ok(listPage);
+ return AjaxResult.success(listPage);
}
@PostMapping("/add")
@Operation(summary = "娣诲姞鍙戣揣淇℃伅")
@Transactional(rollbackFor = Exception.class)
@Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.INSERT)
- public R<?> add(@RequestBody ShippingInfoDto req) throws Exception {
+ public AjaxResult add(@RequestBody ShippingInfoDto req) throws Exception {
LoginUser loginUser = SecurityUtils.getLoginUser();
String sh = OrderUtils.countTodayByCreateTime(shippingInfoMapper, "SH","shipping_no");
// 鍙戣揣瀹℃壒
@@ -69,37 +70,37 @@
req.setShippingNo(sh);
req.setStatus("寰呭鏍�");
boolean save = shippingInfoService.add(req);
- return save ? R.ok() : R.fail();
+ return save ? AjaxResult.success() : AjaxResult.error();
}
@Operation(summary = "鍙戣揣鎵e簱瀛�")
@PostMapping("/deductStock")
@Transactional(rollbackFor = Exception.class)
@Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.UPDATE)
- public R<?> deductStock(@RequestBody ShippingInfoDto req) throws IOException {
- return shippingInfoService.deductStock( req) ? R.ok() : R.fail();
+ public AjaxResult deductStock(@RequestBody ShippingInfoDto req) throws IOException {
+ return shippingInfoService.deductStock( req) ? AjaxResult.success() : AjaxResult.error();
}
@PostMapping("/update")
@Operation(summary = "淇敼鍙戣揣淇℃伅")
@Transactional(rollbackFor = Exception.class)
@Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.UPDATE)
- public R<?> update(@RequestBody ShippingInfo req) {
+ public AjaxResult update(@RequestBody ShippingInfo req) {
ShippingInfo byId = shippingInfoService.getById(req.getId());
if (byId == null) {
- return R.fail("鍙戣揣淇℃伅涓嶅瓨鍦�");
+ return AjaxResult.error("鍙戣揣淇℃伅涓嶅瓨鍦�");
}
boolean update = shippingInfoService.updateById(req);
- return update ? R.ok() : R.fail();
+ return update ? AjaxResult.success() : AjaxResult.error();
}
@DeleteMapping("/delete")
@Operation(summary = "鍒犻櫎鍙戣揣淇℃伅")
@Transactional(rollbackFor = Exception.class)
@Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.DELETE)
- public R<?> delete(@RequestBody List<Long> ids) {
+ public AjaxResult delete(@RequestBody List<Long> ids) {
- return shippingInfoService.delete(ids) ? R.ok("鍒犻櫎鎴愬姛") : R.fail("鍒犻櫎澶辫触");
+ return shippingInfoService.delete(ids) ? AjaxResult.success("鍒犻櫎鎴愬姛") : AjaxResult.error("鍒犻櫎澶辫触");
}
/**
@@ -116,8 +117,8 @@
@GetMapping("/getByCustomerName")
@Operation(summary = "閫氳繃瀹㈡埛鍚嶇О鏌ヨ鍏宠仈鐨勫彂璐у崟鍙�")
- public R<?> getByCustomerName(String customerName) {
- return R.ok(shippingInfoService.getShippingInfoByCustomerName(customerName));
+ public AjaxResult getByCustomerName(String customerName) {
+ return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName));
}
@GetMapping("/getDateil/{id}")
--
Gitblit v1.9.3