,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",C.PROJ_STATUS as "proj_status"
,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",ifnull(C.PROJ_STATUS,1) as "projStatus"
FROM hpjx.t_hpsc002 A
FROM hpjx.t_hpsc002 A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID
LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM,
LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM,