|
|
|
@ -1233,10 +1233,12 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getHunlianTaskIssure" resultType="com.heai.modules.production.entity.HunlianData"> |
|
|
|
select b.SeqNo,b.S_ScheduledDate,b.operatorId,round( sum( case when c.Direction='-' then c.TransQty else c.TransQty* (-1.0) end ),2) as issureQty, |
|
|
|
|
|
|
|
dbo.Get_OperatorDesc(a.site,b.operatorId) operatorName |
|
|
|
select b.SeqNo,b.S_ScheduledDate,b.operatorId,round( sum( case when c.Direction='-' then c.TransQty else 0 end ),2) as issureQty, |
|
|
|
|
|
|
|
dbo.Get_OperatorDesc(a.site,b.operatorId) operatorName ,b.partNo,dbo.Get_Part_SpecDesc(a.site,b.partNo) partDesc, |
|
|
|
round( sum( case when c.Direction='+' then c.TransQty else 0 end ),2) as returnQty, |
|
|
|
round(sum( case when c.Direction='+' then c.TransQty else 0 end )*100/sum( case when c.Direction='-' then c.TransQty else 0 end ),2) as returnPercent |
|
|
|
, round( sum( case when c.Direction='-' then c.TransQty else 0 end )-sum( case when c.Direction='+' then c.TransQty else 0 end ),2) as realQty |
|
|
|
from TransDetail a |
|
|
|
|
|
|
|
left join TransDetail c on a.Site=c.Site and a.PartNo=c.PartNo and a.BatchNo=c.BatchNo and c.TransNo like 'SI%' and c.OrderRef3 is not null |
|
|
|
@ -1247,7 +1249,7 @@ |
|
|
|
|
|
|
|
where b.SeqNo is not null and a.TransNo like 'SR%' and a.Direction='+' and c.TransNo is not null and a.orderRef1=#{orderRef1} and a.site=#{site} |
|
|
|
|
|
|
|
group by a.site,b.SeqNo,b.S_ScheduledDate,b.operatorId |
|
|
|
group by a.site,b.SeqNo,b.S_ScheduledDate,b.operatorId,b.partNo |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="liuhuaIssureAndReport" resultType="com.heai.modules.production.entity.HunlianData"> |
|
|
|
|