From 2a4a0b5f8ed672d4a5f750083b7fc5fb34d89965 Mon Sep 17 00:00:00 2001 From: fyw Date: Tue, 2 Apr 2024 17:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E7=9C=8B=E6=9D=BF=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NFine.Application/SRM/WatchPanelApp.cs | 14 +- .../WatchPanel/PanelWIPZhiXingDa2.cshtml | 2 +- .../WatchPanel/PanelWIPZhiXingDa3.cshtml | 392 +----------------- 3 files changed, 12 insertions(+), 396 deletions(-) diff --git a/NFine.Application/SRM/WatchPanelApp.cs b/NFine.Application/SRM/WatchPanelApp.cs index 363b8ea..a180946 100644 --- a/NFine.Application/SRM/WatchPanelApp.cs +++ b/NFine.Application/SRM/WatchPanelApp.cs @@ -1254,9 +1254,9 @@ ORDER BY 销售车号,物料编码,报工人 ) wipb on tmo.socode = wipb.socode select row_number() over (order by a.客户交货期,a.销售车辆号)as 序号, a.* from ( - select distinct tso.socode 销售车辆号,tso.plandate as 客户交货期, isnull(convert(char(4),cus.fname),'') 用户单位, + select distinct tso.socode 销售车辆号,convert(varchar(10),tso.plandate,120) as 客户交货期, isnull(convert(char(4),cus.fname),'') 用户单位, inv.invname as 产品名称, - concat(cast(cast(tnum.wipnum * 1.0 / tnum.monum as decimal(18,3))* 100 as decimal(18,1)),'%') 进度, + concat(cast(cast(tnum.wipnum * 1.0 / tnum.monum as decimal(18,3))* 100 as decimal(18,0)),'%') 进度, (case when tnum.wipnum/tnum.monum =1 then '已完工' when tnum.wipbnum >0 then '开工中' else '未开工' end ) 生产状态 from icsso tso @@ -1279,9 +1279,7 @@ ORDER BY 销售车号,物料编码,报工人 #region 振翔看板产量 public DataTable GetOutput() { - string SqlText = ""; - SqlText = @" if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempNum')) drop table #tempNum if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempData')) @@ -1310,14 +1308,14 @@ ORDER BY 销售车号,物料编码,报工人 where moth = CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) )a --此部分为上月数据 left join ( select isnull(mpproduct,0) as 前月度生产 from ICSZXBoardPlan - where moth = CONVERT(CHAR(10),DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) ) b on 1=1 --此部分为前月数据 + where moth = CONVERT(CHAR(10),DATEADD(month,0,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) ) b on 1=1 --此部分为前月数据 left join ( select count(*) 上月完成 from #tempNum t where t.wipnum = t.monum and t.EndTime between CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) and CONVERT(CHAR(10),DATEADD(month,0,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120)) c on 1=1 left join ( select count(*) 前月完成 from #tempNum t where t.wipnum = t.monum and t.EndTime between - CONVERT(CHAR(10),DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) + CONVERT(CHAR(10),DATEADD(month,0,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) and CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120)) d on 1=1 left join ( select count(*) 年度生产 from #tempNum t where t.wipnum = t.monum and t.EndTime >= @@ -1334,7 +1332,7 @@ ORDER BY 销售车号,物料编码,报工人 case when isnull(前月完成,0) = 0 then 0 else convert(decimal(10,2),isnull(前月完成,0))*1.0/isnull(convert(decimal(10,2),case when 前月度生产 = 0 then 1 else 前月度生产 end),1) end 前月比, month(DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE()))) 上月, - month(DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE()))) 前月 + month(DATEADD(month,0,DATEADD(dd,-DAY(GETDATE())+1,GETDATE()))) 前月 from #tempData if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempNum')) drop table #tempNum @@ -1460,7 +1458,7 @@ ORDER BY 销售车号,物料编码,报工人 where t.wipnum = t.monum and t.EndTime between CONVERT(CHAR(10),DATEADD(month,-6,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) and CONVERT(CHAR(10),DATEADD(month,-5,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) - + order by Mont if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempNum')) drop table #tempNum "; diff --git a/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml b/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml index e66f605..6122085 100644 --- a/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml +++ b/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml @@ -849,7 +849,7 @@ background-color:#6495ED;"> var value6 = 0; var value7 = 0; for (var i = 0; i < data.length; i++) { - value = data[i].上月度生产; + value = data[i].上月度生产;//前月改本月 value1 = data[i].上月完成; value2 = data[i].前月度生产; value3 = data[i].前月完成; diff --git a/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa3.cshtml b/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa3.cshtml index 5ec5e83..b1f0497 100644 --- a/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa3.cshtml +++ b/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa3.cshtml @@ -160,7 +160,7 @@ .TopNameTime { vertical-align: middle; text-align: right; - font-size: 10px; + font-size: 20px; font-weight: 700; color: white; } @@ -336,7 +336,7 @@