日期:2014-05-17 浏览次数:20631 次
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[S_GetYRReportVolumePeopleWage]
(
@m_SDate varchar(100),
@m_STime varchar(100),
@m_EDate varchar(100),
@m_ETime varchar(100)
)
AS
BEGIN
set @m_SDate=@m_SDate + ' ' + @m_STime
set @m_EDate=@m_EDate + ' ' + @m_ETime
select ISNULL(G_YRPeople.B_Class,'') as B_Class,B_People,
sum(case B_Process when '染色' then B_FactSum else null end) as '染色',
sum(case B_Process when '拉色' then B_FactSum else null end) as '拉色',
sum(case B_Process when '堵布回染' then B_FactSum else null end) as '堵布回染',
sum(case B_Process when '断头回染' then B_FactSum else null end) as '断头回染',
sum(case B_Process when '加色' then B_FactSum else null end) as '加色',
sum(case B_Process when '加色回染' then B_FactSum else null end) as '加色回染',
sum(case B_Process when '前处理' then B_FactSum else null end) as '前处理',
sum(case B_Process when '后处理' then B_FactSum else null end) as '后处理',
sum(case B_Process when '洗缸' then B_FactSum else null end) as '洗缸',
sum(case B_Process when '冲缸' then B_FactSum else null end) as '冲缸',
sum(case B_Process when '剥色' then B_FactSum else null end) as '剥色',
sum(case B_Process when '落水' then B_FactSum else null end) as '落水',
sum(case B_Process when '染色' then B_FactSum else 0 end) +
sum(case B_Process when '拉色' then B_FactSum else 0 end) +
sum(case B_Process when '堵布回染' then B_FactSum else 0 end) +
sum(case B_Process when '断头回染' then B_FactSum else 0 end) +
sum(case B_Process when '加色' then B_FactSum else 0 end) +
sum(case B_Process when '加色回染' then B_FactSum else 0 end)&nbs