【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -15,8 +15,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.ACCOUNT_NOT_ENABLE;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.ACCOUNT_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP 结算账户 Service 实现类
|
||||
@@ -102,7 +101,7 @@ public class ErpAccountServiceImpl implements ErpAccountService {
|
||||
|
||||
@Override
|
||||
public List<ErpAccountDO> getAccountList(Collection<Long> ids) {
|
||||
return accountMapper.selectBatchIds(ids);
|
||||
return accountMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -110,4 +109,4 @@ public class ErpAccountServiceImpl implements ErpAccountService {
|
||||
return accountMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class ErpFinancePaymentServiceImpl implements ErpFinancePaymentService {
|
||||
financePaymentItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
financePaymentItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpFinancePaymentItemDO::getId));
|
||||
financePaymentItemMapper.deleteByIds(convertList(diffList.get(2), ErpFinancePaymentItemDO::getId));
|
||||
}
|
||||
|
||||
// 第三步,更新采购入库、退货的付款金额情况
|
||||
@@ -214,7 +214,7 @@ public class ErpFinancePaymentServiceImpl implements ErpFinancePaymentService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteFinancePayment(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpFinancePaymentDO> payments = financePaymentMapper.selectBatchIds(ids);
|
||||
List<ErpFinancePaymentDO> payments = financePaymentMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(payments)) {
|
||||
return;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ public class ErpFinancePaymentServiceImpl implements ErpFinancePaymentService {
|
||||
financePaymentMapper.deleteById(payment.getId());
|
||||
// 2.2 删除付款单项
|
||||
List<ErpFinancePaymentItemDO> paymentItems = financePaymentItemMapper.selectListByPaymentId(payment.getId());
|
||||
financePaymentItemMapper.deleteBatchIds(convertSet(paymentItems, ErpFinancePaymentItemDO::getId));
|
||||
financePaymentItemMapper.deleteByIds(convertSet(paymentItems, ErpFinancePaymentItemDO::getId));
|
||||
|
||||
// 2.3 更新采购入库、退货的付款金额情况
|
||||
updatePurchasePrice(paymentItems);
|
||||
@@ -270,4 +270,4 @@ public class ErpFinancePaymentServiceImpl implements ErpFinancePaymentService {
|
||||
return financePaymentItemMapper.selectListByPaymentIds(paymentIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService {
|
||||
financeReceiptItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
financeReceiptItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpFinanceReceiptItemDO::getId));
|
||||
financeReceiptItemMapper.deleteByIds(convertList(diffList.get(2), ErpFinanceReceiptItemDO::getId));
|
||||
}
|
||||
|
||||
// 第三步,更新销售出库、退货的收款金额情况
|
||||
@@ -214,7 +214,7 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteFinanceReceipt(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpFinanceReceiptDO> receipts = financeReceiptMapper.selectBatchIds(ids);
|
||||
List<ErpFinanceReceiptDO> receipts = financeReceiptMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(receipts)) {
|
||||
return;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService {
|
||||
financeReceiptMapper.deleteById(receipt.getId());
|
||||
// 2.2 删除收款单项
|
||||
List<ErpFinanceReceiptItemDO> receiptItems = financeReceiptItemMapper.selectListByReceiptId(receipt.getId());
|
||||
financeReceiptItemMapper.deleteBatchIds(convertSet(receiptItems, ErpFinanceReceiptItemDO::getId));
|
||||
financeReceiptItemMapper.deleteByIds(convertSet(receiptItems, ErpFinanceReceiptItemDO::getId));
|
||||
|
||||
// 2.3 更新销售出库、退货的收款金额情况
|
||||
updateSalePrice(receiptItems);
|
||||
@@ -270,4 +270,4 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService {
|
||||
return financeReceiptItemMapper.selectListByReceiptIds(receiptIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class ErpProductCategoryServiceImpl implements ErpProductCategoryService
|
||||
|
||||
@Override
|
||||
public List<ErpProductCategoryDO> getProductCategoryList(Collection<Long> ids) {
|
||||
return erpProductCategoryMapper.selectBatchIds(ids);
|
||||
return erpProductCategoryMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,16 +16,11 @@ import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.PRODUCT_NOT_ENABLE;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.PRODUCT_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP 产品 Service 实现类
|
||||
@@ -77,7 +72,7 @@ public class ErpProductServiceImpl implements ErpProductService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<ErpProductDO> list = productMapper.selectBatchIds(ids);
|
||||
List<ErpProductDO> list = productMapper.selectByIds(ids);
|
||||
Map<Long, ErpProductDO> productMap = convertMap(list, ErpProductDO::getId);
|
||||
for (Long id : ids) {
|
||||
ErpProductDO product = productMap.get(id);
|
||||
@@ -113,7 +108,7 @@ public class ErpProductServiceImpl implements ErpProductService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<ErpProductDO> list = productMapper.selectBatchIds(ids);
|
||||
List<ErpProductDO> list = productMapper.selectByIds(ids);
|
||||
return buildProductVOList(list);
|
||||
}
|
||||
|
||||
@@ -149,4 +144,4 @@ public class ErpProductServiceImpl implements ErpProductService {
|
||||
return productMapper.selectCountByUnitId(unitId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ErpProductUnitServiceImpl implements ErpProductUnitService {
|
||||
|
||||
@Override
|
||||
public List<ErpProductUnitDO> getProductUnitList(Collection<Long> ids) {
|
||||
return productUnitMapper.selectBatchIds(ids);
|
||||
return productUnitMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
|
||||
|
||||
// 2.1 插入入库
|
||||
ErpPurchaseInDO purchaseIn = BeanUtils.toBean(createReqVO, ErpPurchaseInDO.class, in -> in
|
||||
.setNo(no).setStatus(ErpAuditStatus.PROCESS.getStatus()))
|
||||
.setNo(no).setStatus(ErpAuditStatus.PROCESS.getStatus()))
|
||||
.setOrderNo(purchaseOrder.getNo()).setSupplierId(purchaseOrder.getSupplierId());
|
||||
calculateTotalPrice(purchaseIn, purchaseInItems);
|
||||
purchaseInMapper.insert(purchaseIn);
|
||||
@@ -232,7 +232,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
|
||||
purchaseInItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
purchaseInItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpPurchaseInItemDO::getId));
|
||||
purchaseInItemMapper.deleteByIds(convertList(diffList.get(2), ErpPurchaseInItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePurchaseIn(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpPurchaseInDO> purchaseIns = purchaseInMapper.selectBatchIds(ids);
|
||||
List<ErpPurchaseInDO> purchaseIns = purchaseInMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(purchaseIns)) {
|
||||
return;
|
||||
}
|
||||
@@ -305,4 +305,4 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
|
||||
return purchaseInItemMapper.selectListByInIds(inIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService {
|
||||
purchaseOrderItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
purchaseOrderItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpPurchaseOrderItemDO::getId));
|
||||
purchaseOrderItemMapper.deleteByIds(convertList(diffList.get(2), ErpPurchaseOrderItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePurchaseOrder(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpPurchaseOrderDO> purchaseOrders = purchaseOrderMapper.selectBatchIds(ids);
|
||||
List<ErpPurchaseOrderDO> purchaseOrders = purchaseOrderMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(purchaseOrders)) {
|
||||
return;
|
||||
}
|
||||
@@ -292,4 +292,4 @@ public class ErpPurchaseOrderServiceImpl implements ErpPurchaseOrderService {
|
||||
return purchaseOrderItemMapper.selectListByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
|
||||
|
||||
// 2.1 插入退货
|
||||
ErpPurchaseReturnDO purchaseReturn = BeanUtils.toBean(createReqVO, ErpPurchaseReturnDO.class, in -> in
|
||||
.setNo(no).setStatus(ErpAuditStatus.PROCESS.getStatus()))
|
||||
.setNo(no).setStatus(ErpAuditStatus.PROCESS.getStatus()))
|
||||
.setOrderNo(purchaseOrder.getNo()).setSupplierId(purchaseOrder.getSupplierId());
|
||||
calculateTotalPrice(purchaseReturn, purchaseReturnItems);
|
||||
purchaseReturnMapper.insert(purchaseReturn);
|
||||
@@ -228,7 +228,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
|
||||
purchaseReturnItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
purchaseReturnItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpPurchaseReturnItemDO::getId));
|
||||
purchaseReturnItemMapper.deleteByIds(convertList(diffList.get(2), ErpPurchaseReturnItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePurchaseReturn(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpPurchaseReturnDO> purchaseReturns = purchaseReturnMapper.selectBatchIds(ids);
|
||||
List<ErpPurchaseReturnDO> purchaseReturns = purchaseReturnMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(purchaseReturns)) {
|
||||
return;
|
||||
}
|
||||
@@ -301,4 +301,4 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
|
||||
return purchaseReturnItemMapper.selectListByReturnIds(returnIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.SUPPLIER_NOT_ENABLE;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.SUPPLIER_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP 供应商 Service 实现类
|
||||
@@ -79,7 +78,7 @@ public class ErpSupplierServiceImpl implements ErpSupplierService {
|
||||
|
||||
@Override
|
||||
public List<ErpSupplierDO> getSupplierList(Collection<Long> ids) {
|
||||
return supplierMapper.selectBatchIds(ids);
|
||||
return supplierMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,4 +91,4 @@ public class ErpSupplierServiceImpl implements ErpSupplierService {
|
||||
return supplierMapper.selectListByStatus(status);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
|
||||
@Override
|
||||
public List<ErpCustomerDO> getCustomerList(Collection<Long> ids) {
|
||||
return customerMapper.selectBatchIds(ids);
|
||||
return customerMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,4 +94,4 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
return customerMapper.selectListByStatus(status);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService {
|
||||
saleOrderItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
saleOrderItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpSaleOrderItemDO::getId));
|
||||
saleOrderItemMapper.deleteByIds(convertList(diffList.get(2), ErpSaleOrderItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteSaleOrder(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpSaleOrderDO> saleOrders = saleOrderMapper.selectBatchIds(ids);
|
||||
List<ErpSaleOrderDO> saleOrders = saleOrderMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(saleOrders)) {
|
||||
return;
|
||||
}
|
||||
@@ -304,4 +304,4 @@ public class ErpSaleOrderServiceImpl implements ErpSaleOrderService {
|
||||
return saleOrderItemMapper.selectListByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService {
|
||||
saleOutItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
saleOutItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpSaleOutItemDO::getId));
|
||||
saleOutItemMapper.deleteByIds(convertList(diffList.get(2), ErpSaleOutItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteSaleOut(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpSaleOutDO> saleOuts = saleOutMapper.selectBatchIds(ids);
|
||||
List<ErpSaleOutDO> saleOuts = saleOutMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(saleOuts)) {
|
||||
return;
|
||||
}
|
||||
@@ -313,4 +313,4 @@ public class ErpSaleOutServiceImpl implements ErpSaleOutService {
|
||||
return saleOutItemMapper.selectListByOutIds(outIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService {
|
||||
saleReturnItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
saleReturnItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpSaleReturnItemDO::getId));
|
||||
saleReturnItemMapper.deleteByIds(convertList(diffList.get(2), ErpSaleReturnItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteSaleReturn(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpSaleReturnDO> saleReturns = saleReturnMapper.selectBatchIds(ids);
|
||||
List<ErpSaleReturnDO> saleReturns = saleReturnMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(saleReturns)) {
|
||||
return;
|
||||
}
|
||||
@@ -313,4 +313,4 @@ public class ErpSaleReturnServiceImpl implements ErpSaleReturnService {
|
||||
return saleReturnItemMapper.selectListByReturnIds(returnIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public class ErpStockCheckServiceImpl implements ErpStockCheckService {
|
||||
stockCheckItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
stockCheckItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpStockCheckItemDO::getId));
|
||||
stockCheckItemMapper.deleteByIds(convertList(diffList.get(2), ErpStockCheckItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public class ErpStockCheckServiceImpl implements ErpStockCheckService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteStockCheck(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpStockCheckDO> stockChecks = stockCheckMapper.selectBatchIds(ids);
|
||||
List<ErpStockCheckDO> stockChecks = stockCheckMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(stockChecks)) {
|
||||
return;
|
||||
}
|
||||
@@ -229,4 +229,4 @@ public class ErpStockCheckServiceImpl implements ErpStockCheckService {
|
||||
return stockCheckItemMapper.selectListByCheckIds(checkIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class ErpStockInServiceImpl implements ErpStockInService {
|
||||
stockInItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
stockInItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpStockInItemDO::getId));
|
||||
stockInItemMapper.deleteByIds(convertList(diffList.get(2), ErpStockInItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ErpStockInServiceImpl implements ErpStockInService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteStockIn(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpStockInDO> stockIns = stockInMapper.selectBatchIds(ids);
|
||||
List<ErpStockInDO> stockIns = stockInMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(stockIns)) {
|
||||
return;
|
||||
}
|
||||
@@ -225,4 +225,4 @@ public class ErpStockInServiceImpl implements ErpStockInService {
|
||||
return stockInItemMapper.selectListByInIds(inIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public class ErpStockMoveServiceImpl implements ErpStockMoveService {
|
||||
stockMoveItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
stockMoveItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpStockMoveItemDO::getId));
|
||||
stockMoveItemMapper.deleteByIds(convertList(diffList.get(2), ErpStockMoveItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class ErpStockMoveServiceImpl implements ErpStockMoveService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteStockMove(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpStockMoveDO> stockMoves = stockMoveMapper.selectBatchIds(ids);
|
||||
List<ErpStockMoveDO> stockMoves = stockMoveMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(stockMoves)) {
|
||||
return;
|
||||
}
|
||||
@@ -226,4 +226,4 @@ public class ErpStockMoveServiceImpl implements ErpStockMoveService {
|
||||
return stockMoveItemMapper.selectListByMoveIds(moveIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class ErpStockOutServiceImpl implements ErpStockOutService {
|
||||
stockOutItemMapper.updateBatch(diffList.get(1));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(diffList.get(2))) {
|
||||
stockOutItemMapper.deleteBatchIds(convertList(diffList.get(2), ErpStockOutItemDO::getId));
|
||||
stockOutItemMapper.deleteByIds(convertList(diffList.get(2), ErpStockOutItemDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ErpStockOutServiceImpl implements ErpStockOutService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteStockOut(List<Long> ids) {
|
||||
// 1. 校验不处于已审批
|
||||
List<ErpStockOutDO> stockOuts = stockOutMapper.selectBatchIds(ids);
|
||||
List<ErpStockOutDO> stockOuts = stockOutMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(stockOuts)) {
|
||||
return;
|
||||
}
|
||||
@@ -225,4 +225,4 @@ public class ErpStockOutServiceImpl implements ErpStockOutService {
|
||||
return stockOutItemMapper.selectListByOutIds(outIds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@ import java.util.Map;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.WAREHOUSE_NOT_ENABLE;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.WAREHOUSE_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP 仓库 Service 实现类
|
||||
@@ -94,7 +93,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<ErpWarehouseDO> list = warehouseMapper.selectBatchIds(ids);
|
||||
List<ErpWarehouseDO> list = warehouseMapper.selectByIds(ids);
|
||||
Map<Long, ErpWarehouseDO> warehouseMap = convertMap(list, ErpWarehouseDO::getId);
|
||||
for (Long id : ids) {
|
||||
ErpWarehouseDO warehouse = warehouseMap.get(id);
|
||||
@@ -115,7 +114,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
|
||||
@Override
|
||||
public List<ErpWarehouseDO> getWarehouseList(Collection<Long> ids) {
|
||||
return warehouseMapper.selectBatchIds(ids);
|
||||
return warehouseMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,4 +122,4 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
return warehouseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<if test="endTime != null">
|
||||
AND in_time < #{endTime}
|
||||
</if>
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||
<if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
||||
</if>
|
||||
AND deleted = 0) -
|
||||
(SELECT IFNULL(SUM(total_price), 0)
|
||||
FROM erp_purchase_return
|
||||
@@ -18,7 +20,9 @@
|
||||
<if test="endTime != null">
|
||||
AND return_time < #{endTime}
|
||||
</if>
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||
<if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
||||
</if>
|
||||
AND deleted = 0)
|
||||
</select>
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<if test="endTime != null">
|
||||
AND out_time < #{endTime}
|
||||
</if>
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||
<if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
||||
</if>
|
||||
AND deleted = 0) -
|
||||
(SELECT IFNULL(SUM(total_price), 0)
|
||||
FROM erp_sale_return
|
||||
@@ -18,7 +20,9 @@
|
||||
<if test="endTime != null">
|
||||
AND return_time < #{endTime}
|
||||
</if>
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||
<if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
||||
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
||||
</if>
|
||||
AND deleted = 0)
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user