Browse Source

no message

master
fyw 2 years ago
parent
commit
0358a74110
  1. 10
      NFine.Application/SRM/WatchPanelApp.cs

10
NFine.Application/SRM/WatchPanelApp.cs

@ -1765,7 +1765,7 @@ left join #Tempcccc cc on a.销售车辆号=cc.销售车辆号
left join #yjCheck1 ck on ck.routecode = a.routecode left join #yjCheck1 ck on ck.routecode = a.routecode
left join ICSITEMROUTE2OPLot lot on b.itemcode = lot.ITEMCODE and dj.ROUTECODE = lot.ROUTECODE and lot.OPCODE = dj.opcode left join ICSITEMROUTE2OPLot lot on b.itemcode = lot.ITEMCODE and dj.ROUTECODE = lot.ROUTECODE and lot.OPCODE = dj.opcode
left join ICSINVENTORY e on a.ITEMCODE = e.INVCODE left join ICSINVENTORY e on a.ITEMCODE = e.INVCODE
where year(d.MTIME) = year(GETDATE()) and month(d.MTIME) = month(GETDATE()) and
where year(d.MTIME) = year(GETDATE()) and month(d.MTIME) = month(GETDATE())
union All union All
select distinct c.molotCode [] from select distinct c.molotCode [] from
(select * from ICSITEMROUTE2OP where optionalop ='' and routecode in( (select * from ICSITEMROUTE2OP where optionalop ='' and routecode in(
@ -1781,6 +1781,8 @@ left join #Tempcccc cc on a.销售车辆号=cc.销售车辆号
) jj ) jj
--1 --1
select count(1) Qty into #Tcustt_CKQty select count(1) Qty into #Tcustt_CKQty
from ( from (
@ -1802,7 +1804,11 @@ left join #Tempcccc cc on a.销售车辆号=cc.销售车辆号
isnull((select Qty from #Tcustt_CKQty ),0) , isnull((select Qty from #Tcustt_CKQty ),0) ,
isnull((select count(1) from ICSZXCheck with(nolock) where checked='0'),0) , isnull((select count(1) from ICSZXCheck with(nolock) where checked='0'),0) ,
isnull((select count(1) from ICSZXCheck with(nolock) where checked='1' and month>= CONVERT(varchar(7), dateadd(mm,-1,getdate()), 21) +'-01' ),0) isnull((select count(1) from ICSZXCheck with(nolock) where checked='1' and month>= CONVERT(varchar(7), dateadd(mm,-1,getdate()), 21) +'-01' ),0)
drop table #temp1
drop table #DJ
drop table #yjCheck
drop table #yjCheck1
drop table #filter
if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#Tcustttemp1')) if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#Tcustttemp1'))
drop table #Tcustttemp1 drop table #Tcustttemp1

Loading…
Cancel
Save