From 6416b165e4a3c8ecc2d547ceef0fb3962d3c7b56 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期一, 12 一月 2026 14:58:45 +0800
Subject: [PATCH] 1.查询产品信息列表接口,销售台账查询其产品的状态 2.增添不合格现象字段,取消生产状态字段 3.修改发货审批接口,发货审批通过,生产该订单出库记录 4.存在质检记录并已提交的销售台账删除时做出限制 5.生产报工投入,产出2:1调整
---
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | 29 +----------------------------
1 files changed, 1 insertions(+), 28 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
index 8e6aad1..c137411 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -89,34 +89,7 @@
SysUser user = SecurityUtils.getLoginUser().getUser();
- if (dto.isReportWork()) {
- // 鏇存柊閫昏緫 - 鍙洿鏂版暟閲�
- QueryWrapper<ProductionProductOutput> outputWrapper = new QueryWrapper<>();
- outputWrapper.eq("product_main_id", dto.getProductMainId());
- ProductionProductOutput output = productionProductOutputMapper.selectOne(outputWrapper);
- if (output == null) {
- throw new RuntimeException("浜у嚭璁板綍涓嶅瓨鍦�");
- }
-
- // 鏌ヨ鐢熶骇鏍哥畻璁板綍
- QueryWrapper<SalesLedgerProductionAccounting> accountingWrapper = new QueryWrapper<>();
- accountingWrapper.eq("sales_ledger_work_id", dto.getProductMainId());
- SalesLedgerProductionAccounting accounting = salesLedgerProductionAccountingMapper.selectOne(accountingWrapper);
- if (accounting == null) {
- throw new RuntimeException("鐢熶骇鏍哥畻璁板綍涓嶅瓨鍦�");
- }
-
- // 鍙洿鏂版暟閲�
- if (dto.getQuantity() != null) {
- output.setQuantity(dto.getQuantity());
- productionProductOutputMapper.updateById(output);
- // 鏇存柊鐢熶骇鏍哥畻璁板綍
- accounting.setFinishedNum(dto.getQuantity());
- salesLedgerProductionAccountingMapper.updateById(accounting);
- }
- return true;
- }
// 鏂板閫昏緫
ProductionProductMain productionProductMain = new ProductionProductMain();
@@ -212,7 +185,7 @@
for (ProductStructureDto productStructureDto : productStructureDtos) {
ProductionProductInput productionProductInput = new ProductionProductInput();
productionProductInput.setProductModelId(productStructureDto.getProductModelId());
- productionProductInput.setQuantity(productStructureDto.getUnitQuantity());
+ productionProductInput.setQuantity(productStructureDto.getUnitQuantity().multiply(dto.getQuantity()));
productionProductInput.setProductMainId(productionProductMain.getId());
productionProductInputMapper.insert(productionProductInput);
}
--
Gitblit v1.9.3