From 7b2233d1dab53574facc66b3bebffcd8ca5919de Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 21 三月 2026 14:27:19 +0800
Subject: [PATCH] yys 1.已退货完毕的出库单号不要展示在关联出库单中 2.退货管理唯一处理 3.生产订单-库存数量回显 4.发货管理回显退货数量 5.发货增加详情接口 6.生产核算清理脏数据 7.生产报工-删除生产报工记录报错 8.筛选客户名称数据展示有误
---
src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java | 50 ++++++++++++++++++--------------------------------
1 files changed, 18 insertions(+), 32 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java b/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
index b07730d..29dafda 100644
--- a/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
+++ b/src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
@@ -16,6 +16,7 @@
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.other.service.impl.TempFileServiceImpl;
+import com.ruoyi.procurementrecord.utils.StockUtils;
import com.ruoyi.sales.dto.ShippingInfoDto;
import com.ruoyi.sales.mapper.ShipmentApprovalMapper;
import com.ruoyi.sales.mapper.ShippingInfoMapper;
@@ -50,25 +51,32 @@
@Autowired
private ShippingInfoService shippingInfoService;
- @Autowired
- private ShipmentApprovalMapper shipmentApprovalMapper;
- @Autowired
- private ISalesLedgerProductService salesLedgerProductService;
-
- @Autowired
- private TempFileServiceImpl tempFileService;
@Autowired
private CommonFileServiceImpl commonFileService;
@Autowired
private ApproveProcessServiceImpl approveProcessService;
+ @Autowired
+ private StockUtils stockUtils;
+
+ @GetMapping("/getByCustomerName")
+ @ApiOperation("閫氳繃瀹㈡埛鍚嶇О鏌ヨ")
+ public AjaxResult getByCustomerName(String customerName) {
+ return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName));
+ }
+
+ @ApiOperation("璇︽儏")
+ @GetMapping("/getById")
+ public AjaxResult getById(Long id) {
+ return AjaxResult.success(shippingInfoService.getDateil(id));
+ }
@GetMapping("/listPage")
@ApiOperation("鍙戣揣淇℃伅鍒楄〃")
public AjaxResult listPage(Page page, ShippingInfo req) {
- IPage<ShippingInfo> listPage = shippingInfoService.listPage(page,req);
+ IPage<ShippingInfoDto> listPage = shippingInfoService.listPage(page,req);
return AjaxResult.success(listPage);
}
@@ -95,27 +103,6 @@
return save ? AjaxResult.success() : AjaxResult.error();
}
- @ApiOperation("鍙戣揣鎵e簱瀛�")
- @PostMapping("/deductStock")
- @Transactional(rollbackFor = Exception.class)
- @Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.UPDATE)
- public AjaxResult deductStock(@RequestBody ShippingInfoDto req) throws IOException {
- ShippingInfo byId = shippingInfoService.getById(req.getId());
- if (byId == null) {
- return AjaxResult.error("鍙戣揣淇℃伅涓嶅瓨鍦�");
- }
- byId.setExpressNumber(req.getExpressNumber());
- byId.setExpressCompany(req.getExpressCompany());
- byId.setStatus("宸插彂璐�");
- byId.setShippingCarNumber(req.getShippingCarNumber());
- boolean update = shippingInfoService.updateById(req);
- // 杩佺Щ鏂囦欢
- if(CollectionUtils.isNotEmpty(req.getTempFileIds())){
- tempFileService.migrateTempFilesToFormal(req.getId(), req.getTempFileIds(), FileNameType.SHIP.getValue());
- }
- return update ? AjaxResult.success() : AjaxResult.error();
- }
-
@PostMapping("/update")
@ApiOperation("淇敼鍙戣揣淇℃伅")
@Transactional(rollbackFor = Exception.class)
@@ -134,9 +121,8 @@
@Transactional(rollbackFor = Exception.class)
@Log(title = "鍙戣揣淇℃伅绠$悊", businessType = BusinessType.DELETE)
public AjaxResult delete(@RequestBody List<Long> ids) {
- commonFileService.deleteByBusinessIds(ids, FileNameType.SHIP.getValue());
- boolean delete = shippingInfoService.removeBatchByIds(ids);
- return delete ? AjaxResult.success("鍒犻櫎鎴愬姛") : AjaxResult.error("鍒犻櫎澶辫触");
+
+ return shippingInfoService.delete(ids) ? AjaxResult.success("鍒犻櫎鎴愬姛") : AjaxResult.error("鍒犻櫎澶辫触");
}
@Autowired
--
Gitblit v1.9.3