diff --git a/src/main/resources/mapper/production/DailyPlanMapper.xml b/src/main/resources/mapper/production/DailyPlanMapper.xml index c62c712..139e84c 100644 --- a/src/main/resources/mapper/production/DailyPlanMapper.xml +++ b/src/main/resources/mapper/production/DailyPlanMapper.xml @@ -8,8 +8,8 @@ select a.site, a.OrderNo,a.PartNo,a.Status,a.PlanStartDate,a.NeedDate,a.LotSize,a.EnterDate,a.UserName,a.MaterialSplitFlag,a.RepairSOFlag, P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.qtyReported,S.qtyApprove,S.machSetupTime, - S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,isnull(SOP.TotalFinishedQty,0) lastApproveQty,dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo) weightFactor, - Round(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo)*a.LotSize,2) weight,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderNo) partPlanQty,cod.PlanShipDate, + S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,isnull(SOP.TotalFinishedQty,0) lastApproveQty,P.NetWeight/1000 weightFactor, + Round(isnull(P.NetWeight/1000,1)*a.LotSize,2) weight,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderNo) partPlanQty,cod.PlanShipDate, dbo.Get_LastStartTime( a.site, a.OrderNo,S.ItemNo) LastStartDate,Round(S.DefectiveQty,3) DefectiveQty,dbo.Get_PartValue( a.site,a.PartNo,'CURING METHOD') cuiHuaJi, Round((a.LotSize- S.qtyReported)/case when s.MachRunFactor=0 then 1000000 else s.MachRunFactor end ,1) lastTime ,dbo.Get_E_OriginalOrderTypeDesc(a.site, a.OrderNo) orderTypeDesc @@ -292,7 +292,8 @@ and a.E_Levels = #{eLevels} - order by a.PlanStartDate desc,s.itemNo + order by case when dbo.Get_E_OriginalOrderTypeDesc(a.site, a.OrderNo) in ('变更订单','加急订单') then 1 else 2 end , + a.PlanStartDate desc,s.itemNo update SOTaskOrderHeader set CombineTime = GetDate() where site=#{site} and orderNo=#{orderNo} @@ -366,8 +367,8 @@