| 일반업무 |
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%>
|
<%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"
'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 & "