From d4afabe6cb07b4129f995c82641189b2256b15a7 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 16 三月 2026 14:50:51 +0800
Subject: [PATCH] 1.耗材模块 2.出入库磅单
---
src/main/java/com/ruoyi/consumables/service/impl/ConsumablesOutRecordServiceImpl.java | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/ruoyi/consumables/service/impl/ConsumablesOutRecordServiceImpl.java b/src/main/java/com/ruoyi/consumables/service/impl/ConsumablesOutRecordServiceImpl.java
index e4c9238..521c6dc 100644
--- a/src/main/java/com/ruoyi/consumables/service/impl/ConsumablesOutRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/consumables/service/impl/ConsumablesOutRecordServiceImpl.java
@@ -18,7 +18,6 @@
import com.ruoyi.consumables.mapper.ConsumablesInventoryMapper;
import com.ruoyi.consumables.mapper.ConsumablesOutRecordMapper;
import com.ruoyi.consumables.mapper.ConsumablesUnInventoryMapper;
-import com.ruoyi.consumables.pojo.ConsumablesInRecord;
import com.ruoyi.consumables.pojo.ConsumablesInventory;
import com.ruoyi.consumables.pojo.ConsumablesOutRecord;
import com.ruoyi.consumables.pojo.ConsumablesUnInventory;
@@ -45,30 +44,28 @@
private ConsumablesUnInventoryMapper consumablesUnInventoryMapper;
@Override
- public IPage<ConsumablesOutRecordDto> listPage(Page page, ConsumablesOutRecordDto ConsumablesOutRecordDto) {
- return consumablesOutRecordMapper.listPage(page, ConsumablesOutRecordDto);
+ public IPage<ConsumablesOutRecordDto> listPage(Page page, ConsumablesOutRecordDto consumablesOutRecordDto) {
+ return consumablesOutRecordMapper.listPage(page, consumablesOutRecordDto);
}
@Override
- public int add(ConsumablesOutRecordDto ConsumablesOutRecordDto) {
+ public int add(ConsumablesOutRecordDto consumablesOutRecordDto) {
String no = OrderUtils.countTodayByCreateTime(consumablesOutRecordMapper, "CK");
- ConsumablesOutRecordDto.setOutboundBatches(no);
- ConsumablesInRecord ConsumablesInRecord = new ConsumablesInRecord();
- BeanUtils.copyProperties(ConsumablesOutRecordDto, ConsumablesInRecord);
- return consumablesOutRecordMapper.insert(ConsumablesOutRecordDto);
+ consumablesOutRecordDto.setOutboundBatches(no);
+ return consumablesOutRecordMapper.insert(consumablesOutRecordDto);
}
@Override
- public int update(Long id, ConsumablesOutRecordDto ConsumablesOutRecordDto) {
+ public int update(Long id, ConsumablesOutRecordDto consumablesOutRecordDto) {
// 鍒ゆ柇瀵硅薄鏄惁瀛樺湪
- ConsumablesOutRecord ConsumablesOutRecord = consumablesOutRecordMapper.selectById(id);
- if (ConsumablesOutRecord == null){
+ ConsumablesOutRecord consumablesOutRecord = consumablesOutRecordMapper.selectById(id);
+ if (consumablesOutRecord == null){
throw new BaseException("璇ュ嚭搴撹褰曚笉瀛樺湪,鏃犳硶鏇存柊!!!");
}
String[] ignoreProperties = {"id", "outbound_batches"};//鎺掗櫎id灞炴��
- BeanUtils.copyProperties(ConsumablesOutRecordDto, ConsumablesOutRecord, ignoreProperties);
- return consumablesOutRecordMapper.updateById(ConsumablesOutRecord);
+ BeanUtils.copyProperties(consumablesOutRecordDto, consumablesOutRecord, ignoreProperties);
+ return consumablesOutRecordMapper.updateById(consumablesOutRecord);
}
@Override
@@ -82,7 +79,7 @@
}else {
ConsumablesInventoryDto consumablesInRecordDto = new ConsumablesInventoryDto();
consumablesInRecordDto.setProductModelId(consumablesInventory.getProductModelId());
- consumablesInRecordDto.setQualitity(consumablesOutRecord.getConsumablesOutNum());
+ consumablesInRecordDto.setQualitity(consumablesOutRecord.getStockOutNum());
consumablesInventoryMapper.updateAddConsumablesInventory(consumablesInRecordDto);
}
}else if (consumablesOutRecord.getType().equals("1")) {
@@ -92,7 +89,7 @@
}else {
ConsumablesUnInventoryDto consumablesUnInventoryDto = new ConsumablesUnInventoryDto();
consumablesUnInventoryDto.setProductModelId(consumablesUnInventory.getProductModelId());
- consumablesUnInventoryDto.setQualitity(consumablesOutRecord.getConsumablesOutNum());
+ consumablesUnInventoryDto.setQualitity(consumablesOutRecord.getStockOutNum());
consumablesUnInventoryMapper.updateAddConsumablesUnInventory(consumablesUnInventoryDto);
}
}
@@ -101,8 +98,8 @@
}
@Override
- public void exportConsumablesOutRecord(HttpServletResponse response, ConsumablesOutRecordDto ConsumablesOutRecordDto) {
- List<ConsumablesOutRecordExportData> list = consumablesOutRecordMapper.listConsumablesOutRecordExportData(ConsumablesOutRecordDto);
+ public void exportConsumablesOutRecord(HttpServletResponse response, ConsumablesOutRecordDto consumablesOutRecordDto) {
+ List<ConsumablesOutRecordExportData> list = consumablesOutRecordMapper.listConsumablesOutRecordExportData(consumablesOutRecordDto);
for (ConsumablesOutRecordExportData consumablesInRecordExportData : list) {
if (consumablesInRecordExportData.getType().equals("0")) {
consumablesInRecordExportData.setRecordType(EnumUtil.fromCode(StockOutQualifiedRecordTypeEnum.class, Integer.parseInt(consumablesInRecordExportData.getRecordType())).getValue());
--
Gitblit v1.9.3