|
|
|
@ -325,7 +325,10 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
c.issue_method, |
|
|
|
a.warehouse_id, |
|
|
|
W.WareHouseName AS warehouseName, |
|
|
|
a.BOMItemNo as bOMItemNo |
|
|
|
a.BOMItemNo as bOMItemNo, |
|
|
|
a.component_scrap, |
|
|
|
a.first_inspection_qty, |
|
|
|
a.standard_dosage |
|
|
|
from SOIssueNotifyOrderMaterialList a |
|
|
|
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 |
|
|
|
@ -488,6 +491,33 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
values (#{site},#{notifyNo},'关闭',#{username},GetDate(),#{closeRemark}) |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 获取下一个BOMItemNo --> |
|
|
|
<select id="getNextBOMItemNoForMateria" resultType="String"> |
|
|
|
SELECT |
|
|
|
CASE |
|
|
|
WHEN MAX(BOMItemNo) IS NULL THEN '10' |
|
|
|
ELSE |
|
|
|
CASE |
|
|
|
WHEN ISNUMERIC(MAX(BOMItemNo)) = 1 THEN |
|
|
|
CAST(CAST(MAX(BOMItemNo) AS DECIMAL(10,0)) + 10 AS VARCHAR) |
|
|
|
ELSE '10' |
|
|
|
END |
|
|
|
END |
|
|
|
FROM SOIssueNotifyOrderMaterialList |
|
|
|
WHERE Site = #{site} |
|
|
|
AND NotifyNo = #{notifyNo} |
|
|
|
AND ItemNo = #{itemNo} |
|
|
|
AND ISNUMERIC(BOMItemNo) = 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 保存申请单材料明细 --> |
|
|
|
<insert id="saveSOIssueNotifyOrderMateria"> |
|
|
|
INSERT INTO SOIssueNotifyOrderMaterialList |
|
|
|
(NotifyNo, Site, ItemNo, BOMItemNo, ComponentPartNo, QtyToIssue, QtyToIssue_Original, issueType, remark, warehouse_id, component_scrap, first_inspection_qty, standard_dosage) |
|
|
|
VALUES |
|
|
|
(#{notifyNo}, #{site}, #{itemNo,jdbcType=FLOAT}, #{bOMItemNo}, #{componentPartNo}, #{qtyToIssue,jdbcType=FLOAT}, #{qtyToIssueOriginal,jdbcType=FLOAT}, #{issueType}, #{remark}, #{warehouseId}, #{componentScrap,jdbcType=FLOAT}, #{firstInspectionQty,jdbcType=FLOAT}, #{standardDosage,jdbcType=FLOAT}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="searchNotifyLogClose" resultType="SOIssueNotifyLogData"> |
|
|
|
select id,Site,NotifyNo,[Action],username,ActionTime,ActionRemark ,dbo.plm_get_user_display(Site,username) userDisplay |
|
|
|
from SOIssueNotifyLog where site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
@ -537,7 +567,22 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
|
|
|
|
<update id="updateNotifyDetail"> |
|
|
|
UPDATE SOIssueNotifyOrderMaterialList |
|
|
|
SET QtyToIssue = #{qtyToIssue,jdbcType=DOUBLE} |
|
|
|
SET QtyToIssue = #{qtyToIssue,jdbcType=DOUBLE}, |
|
|
|
component_scrap = #{componentScrap,jdbcType=DOUBLE}, |
|
|
|
first_inspection_qty = #{firstInspectionQty,jdbcType=DOUBLE}, |
|
|
|
standard_dosage = #{standardDosage,jdbcType=DOUBLE} |
|
|
|
WHERE Site = #{site} and NotifyNo = #{notifyNo} and ItemNo = #{itemNo} and BOMItemNo = #{bOMItemNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 根据站点和物料编码查询物料信息 --> |
|
|
|
<select id="getPartBySiteAndPartNo" resultType="com.gaotao.modules.orderIssure.entity.PartEntity"> |
|
|
|
SELECT |
|
|
|
PartNo as partNo, |
|
|
|
PartDescription as partDesc, |
|
|
|
Site as site, |
|
|
|
issue_method as issueMethod, |
|
|
|
outbound_warehouse_id as outboundWarehouseId |
|
|
|
FROM part |
|
|
|
WHERE Site = #{site} AND PartNo = #{partNo} |
|
|
|
</select> |
|
|
|
</mapper> |