Browse Source

2025-10-15

领料申请管理 材料明细页签标准用量取值调整
master
fengyuan_yang 5 months ago
parent
commit
32b08c6c4b
  1. 4
      src/main/java/com/gaotao/modules/orderIssure/service/impl/IssureNotifyServiceImpl.java
  2. 6
      src/main/resources/mapper/orderIssure/IssureNotifyMapper.xml
  3. 59
      src/main/resources/mapper/shopOrder/ShopOrderMapper.xml

4
src/main/java/com/gaotao/modules/orderIssure/service/impl/IssureNotifyServiceImpl.java

@ -452,10 +452,12 @@ public class IssureNotifyServiceImpl implements IssureNotifyService {
item.setNotifyNo(data.getNotifyNo()); item.setNotifyNo(data.getNotifyNo());
item.setSite(data.getSite()); item.setSite(data.getSite());
item.setItemNo(nextItem); item.setItemNo(nextItem);
item.setbOMItemNo(String.valueOf(row.getItemNo()));
// Double 类型的 itemNo 转换为整数字符串去掉小数点后的0
item.setbOMItemNo(row.getItemNo() != null ? String.valueOf(row.getItemNo().intValue()) : "");
item.setComponentPartNo(row.getComponentPartno()); item.setComponentPartNo(row.getComponentPartno());
// qty_required 字段在映射中落到 qtyRequired // qty_required 字段在映射中落到 qtyRequired
item.setQtyToIssue(BigDecimalUtils.multiply(data.getIssureQty(),row.getQtyAssembly(),3)); item.setQtyToIssue(BigDecimalUtils.multiply(data.getIssureQty(),row.getQtyAssembly(),3));
item.setStandardDosage(BigDecimalUtils.multiply(data.getIssureQty(),row.getQtyAssembly(),3).doubleValue());
item.setIssueType("BOM物料"); item.setIssueType("BOM物料");
item.setRemark(row.getRemark()); item.setRemark(row.getRemark());
item.setWarehouseId(row.getOutboundWarehouseId()); item.setWarehouseId(row.getOutboundWarehouseId());

6
src/main/resources/mapper/orderIssure/IssureNotifyMapper.xml

@ -169,10 +169,10 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu)
</delete> </delete>
<insert id="batchSaveSOIssueNotifyOrderMaterialListData"> <insert id="batchSaveSOIssueNotifyOrderMaterialListData">
insert into SOIssueNotifyOrderMaterialList insert into SOIssueNotifyOrderMaterialList
(NotifyNo, Site, ItemNo, BOMItemNo, ComponentPartNo, QtyToIssue, QtyToIssue_Original, issueType, remark, warehouse_id)
(NotifyNo, Site, ItemNo, BOMItemNo, ComponentPartNo, QtyToIssue, QtyToIssue_Original, issueType, remark, warehouse_id, standard_dosage)
values values
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
(#{item.notifyNo}, #{item.site}, #{item.itemNo}, #{item.bOMItemNo}, #{item.componentPartNo}, #{item.qtyToIssue}, 0, #{item.issueType}, #{item.remark}, #{item.warehouseId})
(#{item.notifyNo}, #{item.site}, #{item.itemNo}, #{item.bOMItemNo}, #{item.componentPartNo}, #{item.qtyToIssue}, 0, #{item.issueType}, #{item.remark}, #{item.warehouseId}, #{item.standardDosage,jdbcType=FLOAT})
</foreach> </foreach>
</insert> </insert>
@ -331,7 +331,7 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu)
a.standard_dosage a.standard_dosage
from SOIssueNotifyOrderMaterialList a from SOIssueNotifyOrderMaterialList a
left join SOIssueNotifyOrderList b on a.site = b.site and a.NotifyNo = b.NotifyNo and a.ItemNo = b.ItemNo left join SOIssueNotifyOrderList b on a.site = b.site and a.NotifyNo = b.NotifyNo and a.ItemNo = b.ItemNo
left join SOBOM c on c.site = b.site and b.SOOrderNo = c.OrderNo and c.ItemNo = b.OpsItemNo and c.ComponentPartNo = a.ComponentPartNo
left join SOBOM c on c.site = A.site and b.SOOrderNo = c.OrderNo and c.ItemNo = A.BOMItemNo and c.ComponentPartNo = a.ComponentPartNo
left join WareHouse w on a.site = w.site and a.warehouse_id = w.WareHouseID left join WareHouse w on a.site = w.site and a.warehouse_id = w.WareHouseID
where a.NotifyNo = #{notifyNo} and a.site = #{site} where a.NotifyNo = #{notifyNo} and a.site = #{site}
order by b.needDate, a.ItemNo order by b.needDate, a.ItemNo

59
src/main/resources/mapper/shopOrder/ShopOrderMapper.xml

@ -285,16 +285,55 @@
</where> </where>
</select> </select>
<select id="searchShopOrderByPaging" parameterType="com.gaotao.modules.shopOrder.entity.SearchShopOrder" resultType="com.gaotao.modules.shopOrder.entity.SearchShopOrder"> <select id="searchShopOrderByPaging" parameterType="com.gaotao.modules.shopOrder.entity.SearchShopOrder" resultType="com.gaotao.modules.shopOrder.entity.SearchShopOrder">
Select T.OrderNo,T.NeedDate,T.OrderType,T.PartNo,p.PartDescription+' / '+isnull(p.Spec,'') as PartDescription,
T.LotSize,T.Planner,T.Status,T.CustomerID,P.ConfigurationTemplateID as CustomerName,T.PlanStartDate,T.Leadtime,
T.EnterDate,T.Username,T.FinishedQty,T.ReleaseDate,T.ReleaseGuys,T.ScheduleDate,T.Scheduler,T.IssueDate,
T.ReportDate,T.ReceiveDate,T.Printed,T.ProjectID,pr.ProjectName,T.BOMRevNo,T.RoutingRevNo,T.OriginalNeedDate,
T.OrderRef1,T.OrderRef2,T.Site,T.Remark,CostRollUpFlag,T.ManualFlag,T.OriSOOrderNo,P.FamilyID,
dbo.Get_PartFamilyDesc(P.Site,P.FamilyID) as FamilyName,P.GroupID,dbo.Get_PartGroupDesc(P.Site,P.GroupID) as
GroupName,
T.ReceiveStatus,T.RepairSOFlag,T.E_OriginalOrderType,T.E_OriginalOrderNo,T.E_Levels,P.PartType,P.Remark as
CustPartNo,
T.NeedDate as COPlanShipDate, T.batch_no batchNo,
Select
T.OrderNo,
T.NeedDate,
T.OrderType,
T.PartNo,
p.PartDescription + ' / ' + isnull(p.Spec, '') AS PartDescription,
T.LotSize,
T.Planner,
T.Status,
T.CustomerID,
P.ConfigurationTemplateID AS CustomerName,
T.PlanStartDate,
T.Leadtime,
T.EnterDate,
T.Username,
T.FinishedQty,
T.ReleaseDate,
T.ReleaseGuys,
T.ScheduleDate,
T.Scheduler,
T.IssueDate,
T.ReportDate,
T.ReceiveDate,
T.Printed,
T.ProjectID,
pr.ProjectName,
T.BOMRevNo,
T.RoutingRevNo,
T.OriginalNeedDate,
T.OrderRef1,
T.OrderRef2,
T.Site,
T.Remark,
CostRollUpFlag,
T.ManualFlag,
T.OriSOOrderNo,
P.FamilyID,
dbo.Get_PartFamilyDesc (P.Site, P.FamilyID) AS FamilyName,
P.GroupID,
dbo.Get_PartGroupDesc (P.Site, P.GroupID) AS GroupName,
T.ReceiveStatus,
T.RepairSOFlag,
T.E_OriginalOrderType,
T.E_OriginalOrderNo,
T.E_Levels,
P.PartType,
P.Remark AS CustPartNo,
T.NeedDate AS COPlanShipDate,
T.batch_no batchNo,
<!--(SELECT ROUND(SUM(issureQty),3) FROM SOIssueNotifyOrderList where Site = T.site and sOOrderNo = T.OrderNo)--> 0 alreadyApplyTotal <!--(SELECT ROUND(SUM(issureQty),3) FROM SOIssueNotifyOrderList where Site = T.site and sOOrderNo = T.OrderNo)--> 0 alreadyApplyTotal
from Part as p,ShopOrder as T from Part as p,ShopOrder as T
left join Project as pr on pr.Site=T.Site and pr.Projectid=T.ProjectID left join Project as pr on pr.Site=T.Site and pr.Projectid=T.ProjectID

Loading…
Cancel
Save