From 234efc5947a935d78e175198f9bba06128804c22 Mon Sep 17 00:00:00 2001 From: "DESKTOP-QD1SU79\\Xfu" Date: Thu, 24 Oct 2024 16:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E8=B7=AF=E7=BA=BF=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.FromERP/IcsOp.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ICSSoft.FromERP/IcsOp.cs b/ICSSoft.FromERP/IcsOp.cs index 8de2168..a0e767c 100644 --- a/ICSSoft.FromERP/IcsOp.cs +++ b/ICSSoft.FromERP/IcsOp.cs @@ -59,7 +59,7 @@ u9route.ID as routeID,opu9.ID as OPID,work.Code AS SegCode,u9Group.Code as CrewC -- when timeuom.Name='分钟' then cast (opu9.RunTime/60 as decimal(18,6)) --when timeuom.Name='天' then cast (opu9.RunTime/24 as decimal(18,6)) -- end as Stime, - u9Res.TotalResUsage as Stime, + isnull(opRes.TotalResUsage,0) as Stime, case when timeuom.Name='小时' then cast (opu9.SetupTime as decimal(18,6)) when timeuom.Name='秒' then cast (opu9.SetupTime/3600 as decimal(18,6)) when timeuom.Name='分钟' then cast (opu9.SetupTime/60 as decimal(18,6)) @@ -67,7 +67,7 @@ u9route.ID as routeID,opu9.ID as OPID,work.Code AS SegCode,u9Group.Code as CrewC end as Rtime,u9Res.Code AS resCode,u9Restrl.Name as resName,PerResUsage,PerResOutput, case when IsSubcOperation='0' THEN 'N' else 'Y' end as IsSubcOperation,ITEM.Code as ItemCode,u9Group.Name AS CREWName,u9Linetrl.Name as LineName,worktrl.Name as SegNAME, - u9Res.ResQty + isnull(opRes.ResQty,0) ResQty from {2}.DBO.CBO_Routing u9route LEFT JOIN {2}.DBO.CBO_Routing_Trl u9routetrl on u9routetrl.ID=u9route.ID @@ -214,9 +214,9 @@ WHERE u9route.org='{0}' And u9route.ModifiedOn>='{1}' and u9route.ApproveDate i count++; if (count != RouteOpObj.Count) - routeOpSql += $" SELECT '{b.RouteCode}' as RouteCode,'{b.Opcode}' as Opcode,'{b.Opseq}' as Opseq,'{b.ParallelOp}' as ParallelOp,'{b.ItemCode}' as ItemCode,{b.Rtime} as Rtime,{b.Stime} as Stime,'{b.SEGCODE}' as SEGCODE,'{b.SegName}' as SegName,'{b.CrewCode}' as CrewCode,'{b.CREWName}' as CREWName,'{b.HourRate}' AS HourDate,'{b.EqpCalcType}' as EqpCalcType,{b.ResQty} AS ResQty union all"; + routeOpSql += $" SELECT '{b.RouteCode}' as RouteCode,'{b.Opcode}' as Opcode,'{b.Opseq}' as Opseq,'{b.ParallelOp}' as ParallelOp,'{b.ItemCode}' as ItemCode,{b.Rtime} as Rtime,{b.Stime} as Stime,'{b.SEGCODE}' as SEGCODE,'{b.SegName}' as SegName,'{b.CrewCode}' as CrewCode,'{b.CREWName}' as CREWName,'{b.HourRate}' AS HourRate,'{b.EqpCalcType}' as EqpCalcType,{b.ResQty} AS ResQty union all"; else - routeOpSql += $" SELECT '{b.RouteCode}' as RouteCode,'{b.Opcode}' as Opcode,'{b.Opseq}' as Opseq,'{b.ParallelOp}' as ParallelOp,'{b.ItemCode}' as ItemCode,{b.Rtime} as Rtime,{b.Stime} as Stime,'{b.SEGCODE}' as SEGCODE,'{b.SegName}' as SegName,'{b.CrewCode}' as CrewCode,'{b.CREWName}' as CREWName,'{b.HourRate}' AS HourDate,'{b.EqpCalcType}' as EqpCalcType,{b.ResQty} AS ResQty "; + routeOpSql += $" SELECT '{b.RouteCode}' as RouteCode,'{b.Opcode}' as Opcode,'{b.Opseq}' as Opseq,'{b.ParallelOp}' as ParallelOp,'{b.ItemCode}' as ItemCode,{b.Rtime} as Rtime,{b.Stime} as Stime,'{b.SEGCODE}' as SEGCODE,'{b.SegName}' as SegName,'{b.CrewCode}' as CrewCode,'{b.CREWName}' as CREWName,'{b.HourRate}' AS HourRate,'{b.EqpCalcType}' as EqpCalcType,{b.ResQty} AS ResQty "; }); var itemOpSql = routeOpSql;