From 386597d9acf6acc4e3c3c5ff8ef86b0a7d06a671 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com>
Date: Tue, 3 Feb 2026 16:47:19 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A6=85=E9=81=93=E9=97=AE=E9=A2=98=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../aqgqj/business/backstage/entity/OutPlanVo.java | 2 +-
.../inventory/InventoryCountServiceImpl.java | 2 +-
.../service/plan/PlanApplyServiceImpl.java | 1 +
.../business/backstage/InventoryCountMapper.xml | 14 +++++++++-----
.../mappers/business/backstage/PlanApplyMapper.xml | 4 ++--
.../mappers/business/backstage/PurchaseMapper.xml | 4 ++--
6 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/bonus/aqgqj/business/backstage/entity/OutPlanVo.java b/src/main/java/com/bonus/aqgqj/business/backstage/entity/OutPlanVo.java
index eedfafa..9fe587d 100644
--- a/src/main/java/com/bonus/aqgqj/business/backstage/entity/OutPlanVo.java
+++ b/src/main/java/com/bonus/aqgqj/business/backstage/entity/OutPlanVo.java
@@ -114,5 +114,5 @@ public class OutPlanVo extends ParentVo {
/**
* 状态 0-暂存,1-提交
*/
- private int editStatus;
+ private Integer editStatus;
}
diff --git a/src/main/java/com/bonus/aqgqj/business/backstage/service/inventory/InventoryCountServiceImpl.java b/src/main/java/com/bonus/aqgqj/business/backstage/service/inventory/InventoryCountServiceImpl.java
index d90918f..2ba8ab7 100644
--- a/src/main/java/com/bonus/aqgqj/business/backstage/service/inventory/InventoryCountServiceImpl.java
+++ b/src/main/java/com/bonus/aqgqj/business/backstage/service/inventory/InventoryCountServiceImpl.java
@@ -45,7 +45,7 @@ public class InventoryCountServiceImpl implements InventoryCountService{
record -> record,
(existing, replacement) -> {
// 累加出库数量
- existing.setTotalCk(existing.getTotalCk() + replacement.getTotalCg() + replacement.getTotalLk());
+ existing.setTotalCk( replacement.getTotalCg() + replacement.getTotalLk());
return existing;
}
));
diff --git a/src/main/java/com/bonus/aqgqj/business/backstage/service/plan/PlanApplyServiceImpl.java b/src/main/java/com/bonus/aqgqj/business/backstage/service/plan/PlanApplyServiceImpl.java
index 04a34cf..bf33d56 100644
--- a/src/main/java/com/bonus/aqgqj/business/backstage/service/plan/PlanApplyServiceImpl.java
+++ b/src/main/java/com/bonus/aqgqj/business/backstage/service/plan/PlanApplyServiceImpl.java
@@ -254,6 +254,7 @@ public class PlanApplyServiceImpl implements PlanApplyService {
nonExistList.add(planDevBean);
}else{
planDevBean.setId(bean.getId());
+ planDevBean.setType(bean.getType());
}
}
// 如果存在数据库中不存在的数据,返回提示
diff --git a/src/main/resources/mappers/business/backstage/InventoryCountMapper.xml b/src/main/resources/mappers/business/backstage/InventoryCountMapper.xml
index 278db12..b717a63 100644
--- a/src/main/resources/mappers/business/backstage/InventoryCountMapper.xml
+++ b/src/main/resources/mappers/business/backstage/InventoryCountMapper.xml
@@ -12,16 +12,15 @@
SUM(o.lk_num) AS totalLk,
SUM(o.need_num) AS needNum, -- 需求数量
SUM(o.cg_num + o.lk_num) as totalCk, -- 总出库数量
- sct.price as price
+ (SELECT price FROM st_contract_type sct
+ JOIN st_plan_out_sup spos ON spos.details_id = o.id
+ WHERE sct.model_id = o.model_id LIMIT 1) as price
FROM
st_plan_out_details o
JOIN
st_plan_out spo ON o.out_id = spo.id -- 关联出库表
JOIN
bm_project p ON spo.pro_id = p.ID -- 关联工程表
-
- left join st_contract_type sct on o.model_id = sct.model_id
-
where
1=1
@@ -34,7 +33,12 @@
GROUP BY
p.ID,
- o.model_id
+ o.model_id,
+ o.type,
+ o.`name`,
+ o.model,
+ o.unit,
+ p.`NAME`
@@ -315,4 +315,4 @@
WHERE
bp.is_active = '1'
-
\ No newline at end of file
+
diff --git a/src/main/resources/mappers/business/backstage/PurchaseMapper.xml b/src/main/resources/mappers/business/backstage/PurchaseMapper.xml
index 50d1b46..5e9a0de 100644
--- a/src/main/resources/mappers/business/backstage/PurchaseMapper.xml
+++ b/src/main/resources/mappers/business/backstage/PurchaseMapper.xml
@@ -269,7 +269,7 @@
select pod.type,pod.name,pod.model,pod.model_id modelId,spo.apply_id planId
from st_plan_out spo
left join st_plan_out_details pod on spo.id=pod.out_id
- where spo.apply_id=#{planId} and pod.cg_num>0
+ where spo.apply_id=#{planId}
and pod.id in
@@ -277,7 +277,7 @@
- and (pod.type like concat('%',#{keyWord},'%') or
+ and (pod.name like concat('%',#{keyWord},'%') or
pod.model like concat('%',#{keyWord},'%')
)