28 lines
782 B
MySQL
28 lines
782 B
MySQL
|
|
|
|||
|
|
ALTER PROCEDURE [dbo].[HJGL_spCH_HotProessTrustItem]
|
|||
|
|
(
|
|||
|
|
@HotProessTrustId nvarchar(50),
|
|||
|
|
@ProessTypes nvarchar(50)=null
|
|||
|
|
)
|
|||
|
|
AS
|
|||
|
|
--ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD>ȡί<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
BEGIN
|
|||
|
|
|
|||
|
|
|
|||
|
|
select HotProessTrustId,ISO_IsoNo,JOT_JointNo,JOT_JointDesc,STE_Code,
|
|||
|
|
STRING_AGG((case when ProessTypes='1' then 'Ԥ<EFBFBD><EFBFBD>'
|
|||
|
|
when ProessTypes='2' then '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|||
|
|
when ProessTypes='3' then '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|||
|
|
when ProessTypes='4' then '<EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD>'
|
|||
|
|
when ProessTypes='5' then '<EFBFBD>ȶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|||
|
|
else ''end),'+') as ProessTypes from HJGL_View_CH_HotProessTrustItem TrustItem
|
|||
|
|
where HotProessTrustId=@HotProessTrustId
|
|||
|
|
and (ProessTypes=@ProessTypes or @ProessTypes is null)
|
|||
|
|
group by HotProessTrustId,ISO_IsoNo,JOT_JointNo,JOT_JointDesc,STE_Code
|
|||
|
|
|
|||
|
|
union
|
|||
|
|
|
|||
|
|
select '99999999' as Number,'<EFBFBD><EFBFBD><EFBFBD>¿հ<EFBFBD>' AS ISO_IsoNo,null,null,null,null
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
go
|