<% If (Session("N_depart") = "M" And Session("N_team") = "101") Or (Session("N_depart") = "S" And Session("N_team") = "601") Then %>
| 일반업무 |
<% End If %>
<% If (Session("N_depart") = "E" And Session("N_team") = "101") or Session("User_Number") = "20150302" or Session("User_Number") = "20031102" or Session("User_Number") = "20210405" Then '지정 사용자별 공통 프로젝트 노출
Select Case Session("User_Number")
Case "20160205" '박지훈
p_sn_list = "'9999010','9999061','9999062','9999063','9999064'"
Case "20210107" '신상욱
p_sn_list = "'9999002','9999066','9999091'"
Case "20190601" '이혜진
p_sn_list = "'9999007','9999071','9999072','9999073'"
Case "20210801" '서강신
p_sn_list = "'9999093'"
Case "20150302" '최환
p_sn_list = "'9999065'"
Case "20031102" '채주희
p_sn_list = "'9999017','9999019','9999020','9999013','9999016'"
Case "20210405" '김희정
p_sn_list = "'9999012'"
Case Else
p_sn_list = ""
End Select
If p_sn_list <> "" Then
query = "select * from v_project where p_sn like '9999%' and p_sn != '99999' and p_content is not null and p_sn IN (" & p_sn_list & ")"
rsc.Open query, adoConn, 1
for i = 1 to rsc.RecordCount
%>
| ','<%=rsc("p_subject")%>')"><%=rsc("p_subject")%>
|
<%
rsc.MoveNext
Next
rsc.close
End If
Else
%>
0 and cint(Session("Depart_Code")) <= 40) or cint(Session("Depart_Code")) >= 50 or Session("N_depart") = "S" AND Session("N_team") = "401" then
query = "select * from v_project where p_sn = '9999" & ZeroFormat(Session("Depart_Code"), 3) & "'"
'response.write query & " "
adors.Open Query,adoconn,adOpenStatic,adLockReadOnly
%> onclick="openit('<%=adors("p_sn")%>','<%=adors("p_subject")%>')"><%=adors("p_subject")%>
<% adors.close
end if%>
|
<% End If %>
<%if cint(Session("Depart_Code")) = 18 then '경영전략실의 경우
query = "select * from v_project where p_sn like '9999%' and p_sn != '99999' and p_content is not null and p_content != 'M999'"
'response.write query & " "
'adors.Open Query,adoconn,adOpenStatic,adLockReadOnly
rsc.Open query, adoConn, 1
for i = 1 to rsc.RecordCount
%>
| ','<%=rsc("p_subject")%>')"><%=rsc("p_subject")%>
|
<%
rsc.MoveNext
Next
rsc.close
end if%>
|
<%
end if
if cost_type <> "common" then
%>
<%
'---------------------------------------------------------------
query = " SELECT T.p_sn, T.p_subject, T.p_sub_type "&VbCrlf
If d_cost_type = "research" Then
query = query & " , CASE T.p_sub_type WHEN 'M' THEN isnull(p_method_nm, 'Multi' ) ELSE p_method_nm END as p_method_nm "&VbCrlf
Else
query = query & " , CASE T.p_sub_type WHEN 'M' THEN 'Multi ['+p_method_nm+']' ELSE p_method_nm END as p_method_nm "&VbCrlf
End if
query = query & " , T.p_intention, T.p_depart_dep, D.d_name, p_child_sn "&VbCrlf
query = query & " FROM( "&VbCrlf
query = query & " SELECT TPB.p_sn, TPM.p_subject, TPM.p_sub_type, TPM.p_method_cd, TPM.p_intention ,TPB.p_depart_dep, TPM.p_child_sn "&VbCrlf
query = query & " FROM T_PROJECT_BASE as TPB INNER JOIN T_PROJECT_METHOD as TPM ON TPB.p_sn = TPM.p_sn "&VbCrlf
query = query & " AND TPM.p_progress_status >= (CASE WHEN TPM.p_rsch_dept = '90' THEN '006' ELSE '008' END) AND TPM.p_sub_type = 'C' "&VbCrlf
'조회 옵션
if p_depart <> "0" AND p_depart <> "" then
' 260126 박준성 수정
' 김현정 그룹장님의 요청으로 마케팅 본부원은 마케팅 본부의 모든 프로젝트를 대상으로 조회 될 수 있도록 수정
' https://koworks.kric.com/app/works/applet/98/doc/19759
query = query & " WHERE (("&VbCrlf
if d_cost_type = "research" AND p_depart >= 70 AND p_depart <= 79 then
query = query & " p_depart_dep / 10 = 7 "&VbCrlf
query = query & " or p_rsch_dept / 10 = 7 "&VbCrlf
else
query = query & " p_depart_dep = " & p_depart & " "&VbCrlf
query = query & " or p_rsch_dept = " & p_depart & " "&VbCrlf
' query = query & " or p_rsch_dept = 90 "&VbCrlf
query = query & " or p_field_dept = " & p_depart & " "&VbCrlf
query = query & " or p_is_dept = " & p_depart & " "&VbCrlf
query = query & " or p_it_dept = " & p_depart & " "&VbCrlf
query = query & " or p_supp_dept = " & p_depart & " " &VbCrlf
end if
' 260126 박준성 수정
query = query & " ) OR ( "
query = query & " p_rsch_1_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_a = '" & session("User_Number") & "' OR "
query = query & " p_rsch_1_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_b = '" & session("User_Number") & "' OR "
query = query & " p_rsch_1_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_2_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_3_c = '" & session("User_Number") & "' OR "
query = query & " p_rsch_4_c = '" & session("User_Number") & "' "
query = query & " )) "
else
'query = query & " WHERE (p_depart_dep <= 10 or (p_depart_dep >= 20 and p_depart_dep <=80) or p_rsch_dept = 90) "&VbCrlf
query = query & " WHERE 1=1 "&VbCrlf
end If
If d_cost_type = "field" Then
query = query & " and tpm.p_field_complete is null "&VbCrlf
if Session("teamplace") <>"3" then
query = query & " and (tpm.p_sv_1 = '"& Session("User_Number") &"' or tpm.p_sv_2 = '"& Session("User_Number") &"' or tpm.p_sv_3 = '"& Session("User_Number") &"' or tpm.p_sv_4 = '"& Session("User_Number") &"' or tpm.p_code_1 = '"& Session("User_Number") &"' or tpm.p_verify_1 = '"& Session("User_Number") &"' or tpm.p_punch_1 = '"& Session("User_Number") &"') "&VbCrlf
end if
elseif d_cost_type = "research" Then
query = query & " and tpm.p_research_complete is null "&VbCrlf
elseif d_cost_type = "dp" Then
query = query & " and tpm.p_dp_complete is null "&VbCrlf
else
query = query & " and (tpm.p_research_complete + tpm.p_field_complete + tpm.p_dp_complete IS NULL) "&VbCrlf
End if
query = query & " and TPB.p_sn > '19' "
query = query & " ) as T "&VbCrlf
query = query & " LEFT OUTER JOIN Depart D ON T.p_depart_dep = D.d_code AND D.d_yes_no = 'Y' "&VbCrlf
query = query & " LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON T.p_method_cd = TPMC.p_method_cd "&VbCrlf
query = query & " GROUP BY p_sn, p_subject, p_sub_type, T.p_method_cd, p_method_nm, p_intention, p_depart_dep, d_name, p_child_sn "&VbCrlf
query = query & " ORDER BY p_sn, p_child_sn, p_subject"&VbCrlf
'---------------------------------------------------------------
' Response.Write query & "