|
|
@ -178,7 +178,10 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="getOrderView" resultType="OrderViewData"> |
|
|
<select id="getOrderView" resultType="OrderViewData"> |
|
|
SELECT site,a.OrderNo,dbo.Get_Part_Spec(a.site,a.PartNo) partSpec,dbo.Get_orderView_liuhuaReportTime(a.site,a.OrderNo) as firstReportDate, |
|
|
|
|
|
|
|
|
SELECT site, |
|
|
|
|
|
a.OrderNo, |
|
|
|
|
|
dbo.Get_Part_Spec(a.site, a.PartNo) partSpec, |
|
|
|
|
|
dbo.Get_orderView_liuhuaReportTime(a.site, a.OrderNo) as firstReportDate, |
|
|
Round(isnull(dbo.Get_orderView_liuhuaReport(a.site, a.OrderNo), 0), 3) as liuhuaReport, |
|
|
Round(isnull(dbo.Get_orderView_liuhuaReport(a.site, a.OrderNo), 0), 3) as liuhuaReport, |
|
|
Round(isnull(dbo.Get_orderView_liuhuaFinish(a.site, a.OrderNo), 0), 3) as liuhuaFinish, |
|
|
Round(isnull(dbo.Get_orderView_liuhuaFinish(a.site, a.OrderNo), 0), 3) as liuhuaFinish, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '修边'), 0), 3) as xiubianReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '修边'), 0), 3) as xiubianReport, |
|
|
@ -186,12 +189,15 @@ |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '检验'), 0), 3) as jianyanReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '检验'), 0), 3) as jianyanReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '加工'), 0), 3) as jiagongReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '加工'), 0), 3) as jiagongReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '包装'), 0), 3) as baozhuangReport, |
|
|
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '包装'), 0), 3) as baozhuangReport, |
|
|
Round(FinishedQty,3) FinishedQty , |
|
|
|
|
|
LotSize,NeedDate |
|
|
|
|
|
|
|
|
Round(FinishedQty, 3) as FinishedQty, |
|
|
|
|
|
dbo.Get_CustomerDesc(a.Site, a.CustomerID) as customerDesc, |
|
|
|
|
|
LotSize, |
|
|
|
|
|
NeedDate |
|
|
FROM ShopOrder a |
|
|
FROM ShopOrder a |
|
|
<where> |
|
|
<where> |
|
|
AND a.PartNo like 'FP%' |
|
|
AND a.PartNo like 'FP%' |
|
|
AND a.status != '已取消' and a.status != '已计划' |
|
|
|
|
|
|
|
|
AND a.status != '已取消' |
|
|
|
|
|
and a.status != '已计划' |
|
|
<if test="partNo != null and partNo != ''"> |
|
|
<if test="partNo != null and partNo != ''"> |
|
|
and a.partNo like #{partNo} |
|
|
and a.partNo like #{partNo} |
|
|
</if> |
|
|
</if> |
|
|
@ -213,6 +219,9 @@ |
|
|
<if test="endDate != null"> |
|
|
<if test="endDate != null"> |
|
|
AND #{endDate} >= DATEADD(dd, -1, a.EnterDate) |
|
|
AND #{endDate} >= DATEADD(dd, -1, a.EnterDate) |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="customerId != null and customerId != ''"> |
|
|
|
|
|
AND a.CustomerID like #{customerId} |
|
|
|
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|