Browse Source

no message

master
fyw 2 years ago
parent
commit
c3c562d37f
  1. 37
      NFine.Application/SRM/WatchPanelApp.cs
  2. 29
      NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml

37
NFine.Application/SRM/WatchPanelApp.cs

@ -1217,8 +1217,6 @@ ORDER BY 销售车号,物料编码,报工人
string where1 = ""; string where1 = "";
string SqlText = ""; string SqlText = "";
SqlText = @" --socode销售车辆号 monum工单总行 wipnum报告结束数量 wipbnum报告的数量含开工中 SqlText = @" --socode销售车辆号 monum工单总行 wipnum报告结束数量 wipbnum报告的数量含开工中
select tmo.socode,tmo.monum,isnull(wip.wipnum ,0) as wipnum , isnull(wipb.num ,0) as wipbnum select tmo.socode,tmo.monum,isnull(wip.wipnum ,0) as wipnum , isnull(wipb.num ,0) as wipbnum
into #tempNum into #tempNum
@ -1233,8 +1231,8 @@ ORDER BY 销售车号,物料编码,报工人
select tso.socode ,count(*) as wipnum from select tso.socode ,count(*) as wipnum from
icsso tso icsso tso
left join (select mocode,molotcode from icsmo group by mocode,molotcode) tmo on tso.socode = tmo.molotcode left join (select mocode,molotcode from icsmo group by mocode,molotcode) tmo on tso.socode = tmo.molotcode
LEFT JOIN ICSLOTONWIP wip on tmo.mocode = wip.mocode
where wip.actionresult='COLLECT_END'
LEFT JOIN ICSLOTSIMULATION wip on tmo.mocode = wip.mocode
where wip.iscom='1'
group by tso.socode group by tso.socode
) wip on tmo.socode = wip.socode ) wip on tmo.socode = wip.socode
left join left join
@ -1248,15 +1246,16 @@ ORDER BY 销售车号,物料编码,报工人
) wipb on tmo.socode = wipb.socode ) wipb on tmo.socode = wipb.socode
select row_number() over (order by a.,a.)as , a.* from ( select row_number() over (order by a.,a.)as , a.* from (
select distinct tso.socode ,tso.plandate as , isnull(convert(varchar(2),cus.fname),'') ,
select distinct tso.socode ,tso.plandate 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,1)),'%') ,
(case when tnum.wipnum/tnum.monum =1 then '' when tnum.wipbnum >0 then '' else '' end ) (case when tnum.wipnum/tnum.monum =1 then '' when tnum.wipbnum >0 then '' else '' end )
from from
icsso tso icsso tso
left join ICSCustomer cus on tso.cusid = cus.ID
left join ICSCustomer cus on tso.cusid = cus.FCUSTID
left join icsmo tmo on tso.socode = tmo.molotcode left join icsmo tmo on tso.socode = tmo.molotcode
left join #tempNum tnum on tnum.socode = tso.socode left join #tempNum tnum on tnum.socode = tso.socode
left join ICSINVENTORY inv on inv.invcode = tmo.itemcode
left join ICSINVENTORY inv on inv.invstd LIKE '%'+'.'+tmo.molotcode
where tso.status = 'C' and tmo.id in(select moid from ICSMO2ROUTE)) a where tso.status = 'C' and tmo.id in(select moid from ICSMO2ROUTE)) a
if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempNum')) if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#tempNum'))
drop table #tempNum "; drop table #tempNum ";
@ -1290,20 +1289,20 @@ ORDER BY 销售车号,物料编码,报工人
group by tso.socode group by tso.socode
) tmo ) tmo
left join ( left join (
select tso.socode ,count(*) as wipnum,wip.EndTime from
select tso.socode ,count(*) as wipnum,min(wip.EndTime) EndTime from
icsso tso icsso tso
left join (select mocode,molotcode from icsmo group by mocode,molotcode) tmo on tso.socode = tmo.molotcode left join (select mocode,molotcode from icsmo group by mocode,molotcode) tmo on tso.socode = tmo.molotcode
LEFT JOIN ICSLOTONWIP wip on tmo.mocode = wip.mocode
where wip.actionresult='COLLECT_END'
group by tso.socode,wip.EndTime
LEFT JOIN ICSLOTSIMULATION wip on tmo.mocode = wip.mocode
where wip.iscom='1'
group by tso.socode
) wip on tmo.socode = wip.socode ) wip on tmo.socode = wip.socode
select * into #tempData from( select * into #tempData from(
select isnull(mpproduct,0) as from ICSZXBoardPlan select isnull(mpproduct,0) as from ICSZXBoardPlan
where moth = CONVERT(CHAR(10),DATEADD(month,0,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) )a --
where moth = CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) )a --
left join ( left join (
select isnull(mpproduct,0) as from ICSZXBoardPlan select isnull(mpproduct,0) as from ICSZXBoardPlan
where moth = CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) ) b on 1=1 --
where moth = CONVERT(CHAR(10),DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120) ) b on 1=1 --
left join ( left join (
select count(*) from #tempNum t where t.wipnum = t.monum and t.EndTime between 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) CONVERT(CHAR(10),DATEADD(month,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())),120)
@ -1315,10 +1314,14 @@ ORDER BY 销售车号,物料编码,报工人
select isnull(,'0') , isnull(,'0') , select isnull(,'0') , isnull(,'0') ,
isnull(,'0') , isnull(,'0') , isnull(,'0') , isnull(,'0') ,
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 ,
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 ,
--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 ,
--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 ,
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 ,
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,-1,DATEADD(dd,-DAY(GETDATE())+1,GETDATE()))) ,
month(DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE()))) month(DATEADD(month,-2,DATEADD(dd,-DAY(GETDATE())+1,GETDATE())))
from #tempData from #tempData

29
NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa2.cshtml

@ -233,11 +233,14 @@
#div3-C1-C1 { #div3-C1-C1 {
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
#div3-C1-C2 { #div3-C1-C2 {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
} }
#div3-C1-C2-div1 { #div3-C1-C2-div1 {
@ -366,7 +369,7 @@
<ul class="ul_title"> <ul class="ul_title">
<li>序号</li> <li>序号</li>
<li>生产编号</li> <li>生产编号</li>
@*<li>产品名称</li>*@
<li>产品名称</li>
<li>用户单位</li> <li>用户单位</li>
<li>客户交货期</li> <li>客户交货期</li>
<li>生产状态</li> <li>生产状态</li>
@ -835,7 +838,7 @@
var value6 = 0; var value6 = 0;
var value7 = 0; var value7 = 0;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
value = data[i].生产上月度生产;
value = data[i].上月度生产;
value1 = data[i].上月完成; value1 = data[i].上月完成;
value2 = data[i].前月度生产; value2 = data[i].前月度生产;
value3 = data[i].前月完成; value3 = data[i].前月完成;
@ -844,12 +847,12 @@
value6 = data[0].前月; value6 = data[0].前月;
value7 = data[0].上月; value7 = data[0].上月;
} }
$("#div3-C1-C1").html(value6 +"月完成率");
$("#div3-C2-C1").html(value7 +"月完成率");
$("#div3-C1-C2-div1").html(value2);
$("#div3-C1-C2-div2").html(value3);
$("#div3-C1-C2-div1").html(value);
$("#div3-C1-C2-div2").html(value1);
$("#div3-C1-C1").html(value7 +"月完成率");
$("#div3-C2-C1").html(value6 +"月完成率");
$("#div3-C1-C2-div1").html(value3);
$("#div3-C1-C2-div2").html(value2);
$("#div3-C2-C2-div1").html(value1);
$("#div3-C2-C2-div2").html(value);
//MonthPercent = [80, 75.23, 98, 40, 60,53];//测试 //MonthPercent = [80, 75.23, 98, 40, 60,53];//测试
var data = [value5, value5, value5]; var data = [value5, value5, value5];
@ -857,7 +860,7 @@
title: [ title: [
{ {
text: value6 + '月完成率',
text: value7 + '月完成率',
x: '22%', x: '22%',
y: '90%', y: '90%',
textStyle: { textStyle: {
@ -869,7 +872,7 @@
}, },
}, },
{ {
text: value7 + '月完成率',
text: value6 + '月完成率',
x: '76%', x: '76%',
y: '90%', y: '90%',
textStyle: { textStyle: {
@ -954,7 +957,7 @@
globalCoord: false, globalCoord: false,
}, },
], ],
data: [value3, value3,value3], // data个数代表波浪数
data: [value5, value5,value5], // data个数代表波浪数
backgroundStyle: { backgroundStyle: {
borderWidth: 1, borderWidth: 1,
color: 'RGBA(51, 66, 127, 0.7)', color: 'RGBA(51, 66, 127, 0.7)',
@ -1109,7 +1112,7 @@
color: "rgba(28, 231, 224, 1)" // 设置X轴颜色为红色 color: "rgba(28, 231, 224, 1)" // 设置X轴颜色为红色
} }
}, },
max: 100
max: 20
}, },
series: [ series: [
{ {
@ -1187,7 +1190,7 @@
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
html += ' <ul class="ul_con"> '; html += ' <ul class="ul_con"> ';
html += ' <li >' + data[i].序号 + '</li> '; html += ' <li >' + data[i].序号 + '</li> ';
html += ' <li >' + data[i].销售车辆号 + '</li> <li >' + data[i].用户单位 + '</li>';
html += ' <li >' + data[i].销售车辆号 + '</li> <li >' + data[i].产品名称 + '</li> <li >' + data[i].用户单位 +'</li>';
html += ' <li >' + data[i].客户交货期 + '</li> <li >' + data[i].生产状态 + '</li>'; html += ' <li >' + data[i].客户交货期 + '</li> <li >' + data[i].生产状态 + '</li>';
html += ' <li >' + data[i].进度 + '</li> </ul> '; html += ' <li >' + data[i].进度 + '</li> </ul> ';
} }

Loading…
Cancel
Save