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},'%')
)