@ -85,17 +85,22 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId,dispatched_hunlian FROM SOTaskOrde
SELECT top 10000 SOT.OrderNo,SOT.Site,SOT.Status,SOT.OrderDate,SOT.OrderQty,SOT.OrderRefType,SOT.OrderRef1, CASE WHEN SOT.CloseFlag ='N' THEN '正常' ELSE '已流转' END as CloseFlag,
SELECT top 10000 SOT.OrderNo,SOT.Site,SOT.Status,SOT.OrderDate,SOT.OrderQty,SOT.OrderRefType,SOT.OrderRef1, CASE WHEN SOT.CloseFlag ='N' THEN '正常' ELSE '已流转' END as CloseFlag,
SOT.PartNo,SOT.UserName,SOT.EnterDate,SOT.Qtyfinished,SOT.QtyFinished_Ontime,SOT.ShiftId,dbo.Get_Part_SpecDesc(SOT.Site,SOT.PartNo) PartDescription,SOT.QtyCirculation,isnull(SOT.InputQty,0)as InputQty,SOT.ReportTime
SOT.PartNo,SOT.UserName,SOT.EnterDate,SOT.Qtyfinished,SOT.QtyFinished_Ontime,SOT.ShiftId,dbo.Get_Part_SpecDesc(SOT.Site,SOT.PartNo) PartDescription,SOT.QtyCirculation,isnull(SOT.InputQty,0)as InputQty,SOT.ReportTime
,Round(dbo.Get_PartWeightFactorForReport(SOT.Site,SOT.OrderNo,SOT.OrderRef1)*SOT.OrderQty,2) as weight
,Round(dbo.Get_PartWeightFactorForReport(SOT.Site,SOT.OrderNo,SOT.OrderRef1)*SOT.OrderQty,2) as weight
,isnull(dbo.Get_PartPlanQty(SOT.site,SOT.PartNo,SOT.OrderRef1),0) partPlanQty
,isnull(dbo.Get_PartPlanQty(SOT.site,SOT.PartNo,SOT.OrderRef1),0) partPlanQty,c.TaskNo
FROM SOTaskOrderHeader SOT
FROM SOTaskOrderHeader SOT
left join Hunlian_TaskDetail c on SOT.site=c.site and SOT.OrderNo=c.OrderNo
left join Hunlian_TaskHeader d on c.site=d.site and c.TaskNo=d.TaskNo
LEFT join Part P on P.Site= SOT.Site and P.PartNo=SOT.PartNo
LEFT join Part P on P.Site= SOT.Site and P.PartNo=SOT.PartNo
<!-- LEFT join ShopOrder s on s.site=SOT.Site and s.orderNo=SOT.OrderRef1 -->
<!-- LEFT join ShopOrder s on s.site=SOT.Site and s.orderNo=SOT.OrderRef1 -->
<where >
<where >
and (d.DeleteFlag='N' or d.DeleteFlag is null)
<if test= "orderNo != null and orderNo != ''" >
<if test= "orderNo != null and orderNo != ''" >
AND SOT.OrderNo like #{orderNo}
AND SOT.OrderNo like #{orderNo}
</if>
</if>
<if test= "orderRef1 != null and orderRef1 != ''" >
<if test= "orderRef1 != null and orderRef1 != ''" >
AND SOT.OrderRef1 like #{orderRef1}
AND SOT.OrderRef1 like #{orderRef1}
</if>
<if test= "taskNo != null and taskNo != ''" >
AND c.TaskNo like #{taskNo}
</if>
</if>
<if test= "partNo != null and partNo != ''" >
<if test= "partNo != null and partNo != ''" >
AND SOT.PartNo like #{partNo}
AND SOT.PartNo like #{partNo}
@ -116,7 +121,7 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId,dispatched_hunlian FROM SOTaskOrde
${sql}
${sql}
</where>
</where>
order by OrderDate
order by SOT. OrderDate
</select>
</select>
<select id= "getWorkPlanDataByOrderRef1AndDate" resultType= "com.heai.modules.production.entity.SOTaskOrderHeaderData" parameterType= "com.heai.modules.production.entity.SOTaskOrderHeaderData" >
<select id= "getWorkPlanDataByOrderRef1AndDate" resultType= "com.heai.modules.production.entity.SOTaskOrderHeaderData" parameterType= "com.heai.modules.production.entity.SOTaskOrderHeaderData" >