599 lines
23 KiB
Plaintext
599 lines
23 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<!-- #include virtual = "include/holiday_count.asp" -->
|
|
<%
|
|
set rsp = server.CreateObject("ADODB.RECORDSET")
|
|
set rsm = server.CreateObject("ADODB.RECORDSET")
|
|
|
|
d_no = request("d_no")
|
|
approve_pass = request("approve_pass")
|
|
tmp_pass_psn = request("tmp_pass_psn")
|
|
title = request("title")
|
|
|
|
set dbin = server.CreateObject("ADODB.CONNECTION")
|
|
|
|
query = " SELECT * "
|
|
query = query & " FROM Document as a with(nolock) "
|
|
query = query & " INNER JOIN 문서내용 as b with(nolock) on a.d_no = b.문서번호 "
|
|
query = query & " WHERE a.d_no='" & d_no & "' "
|
|
|
|
rsc.Open query, adoConn, 1
|
|
if rsc.RecordCount > 0 then
|
|
'----------------------------------------------------
|
|
if rsc("d_order_cnt") <> "77" then
|
|
tmp = split(rsc("target99"), "^^")
|
|
for i = 0 to ubound(tmp)
|
|
if trim(tmp(i)) = "" then
|
|
if approve_pass = "1" then
|
|
tmp(i) = "부재"
|
|
else
|
|
tmp(i) = Session("loginuser") & "<BR>" & replace(date(), "-", "") & "<BR>" & Session("User_Number")
|
|
end if
|
|
tmp_i = i
|
|
exit for
|
|
end if
|
|
|
|
'response.write "<br> tmp(i) = "& tmp(i)
|
|
'response.write "<br> i = "& i
|
|
next
|
|
'----------------------------------------------------
|
|
'target100에 날짜 삽입
|
|
tmp2 = split(rsc("target100"), "^^")
|
|
tmp2(tmp_i) = month(now()) & " / " & day(now())
|
|
'----------------------------------------------------
|
|
'다음결재자를 가르키도록 하나를 더해 줌
|
|
tmp_i = tmp_i + 1
|
|
|
|
for i = int(rsc("d_order_cnt")) + 1 to ubound(tmp) + 1
|
|
if rsc("d_order" & i) = "전결" or rsc("d_order" & i) = "NO" then
|
|
tmp_order_value = "전결"
|
|
|
|
if rsc("d_order" & i) = "전결" then
|
|
tmp_1 = "1"
|
|
else
|
|
tmp_1 = "0"
|
|
end if
|
|
|
|
if tmp_1 = "1" then
|
|
response.write tmp_order_value
|
|
tmp(tmp_i) = tmp_order_value
|
|
tmp_i = tmp_i + 1
|
|
end if
|
|
|
|
else
|
|
d_order_cnt = i
|
|
d_orders = rsc("d_order" & i)
|
|
exit for
|
|
end if
|
|
next
|
|
|
|
'결재 최종완료
|
|
if i > ubound(tmp) + 1 then
|
|
d_order_cnt = "77"
|
|
'if rsc("d_flag") = "1" or rsc("d_flag") = "4" then '담당자에게 보내야 하는것들(휴가원,출퇴근)
|
|
' d_orders = tmp_ess(4, 3)
|
|
' if rsc("login_p_no") = "20220801" or rsc("login_p_no") = "20190703" or rsc("login_p_no") = "20191202" then ' 양영은 책임님, 권다원 인턴은 자동처리
|
|
' d_orders = rsc("login_p_no")
|
|
' end if
|
|
'else
|
|
d_orders = rsc("login_p_no")
|
|
'end if
|
|
end if
|
|
|
|
'//-- hwkim 20230215 test
|
|
'response.write "<br> tmp = "& ubound(tmp)
|
|
'response.write "<br> i = "& i
|
|
'response.write "<br> ubound(tmp) + 1 = "& (ubound(tmp) + 1 )
|
|
'response.write "<br> d_order_cnt = "& d_order_cnt
|
|
'response.write "<br> rsc('d_order_cnt') = "& rsc("d_order_cnt")
|
|
'response.write "<br>"
|
|
'response.end
|
|
|
|
target99 = ""
|
|
for i = 0 to ubound(tmp)
|
|
if i <> 0 then
|
|
target99 = target99 & "^^"
|
|
end if
|
|
target99 = target99 & tmp(i)
|
|
next
|
|
|
|
target100 = ""
|
|
for i = 0 to ubound(tmp2)
|
|
if i <> 0 then
|
|
target100 = target100 & "^^"
|
|
end if
|
|
target100 = target100 & tmp2(i)
|
|
next
|
|
if rsc("문서제목") = "휴가원" and d_order_cnt = "77" Then
|
|
'담당자 처리시 자동으로 job테이블에 삽입해 줌
|
|
'tmp_1 Job_Code, tmp_2 업무 시간(h)
|
|
if rsc("target3") = "연차 휴가" then
|
|
tmp_1 = "8"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "오전 반차" then
|
|
tmp_1 = "10"
|
|
tmp_2 = "4"
|
|
elseif rsc("target3") = "오후 반차" then
|
|
tmp_1 = "11"
|
|
tmp_2 = "4"
|
|
elseif instr(1, rsc("target3"), "공가") then
|
|
tmp_1 = "18"
|
|
tmp_2 = "8"
|
|
elseif instr(1, rsc("target3"), "병가") then
|
|
tmp_1 = "12"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "포상 휴가" then
|
|
tmp_1 = "14"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "안식 휴가" then
|
|
tmp_1 = "15"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "경조 휴가" then
|
|
tmp_1 = "16"
|
|
tmp_2 = "8"
|
|
elseif instr(1, rsc("target3"), "산전") then
|
|
tmp_1 = "17"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "대체 휴무" then
|
|
tmp_1 = "9"
|
|
tmp_2 = "8"
|
|
elseif rsc("target3") = "기타 휴가" then
|
|
tmp_1 = "19"
|
|
tmp_2 = "8"
|
|
end if
|
|
|
|
for i = cdate(rsc("target1")) to cdate(rsc("target2"))
|
|
Call day_off_chk(year(i), month(i), day(i))
|
|
if day_off <> "true" then
|
|
p_no = rsc("login_p_no") ''결재 상신자 사번
|
|
|
|
query = " SELECT * "
|
|
query = query & " FROM Job_List "
|
|
query = query & " WHERE p_no = '" & p_no & "' "
|
|
query = query & " AND j_contents = '" & tmp_1 & "' "
|
|
query = query & " AND j_date = '" & i & "' "
|
|
query = query & " AND j_Flag = '1' "
|
|
|
|
adoRs.Open Query, adoConn,1' adOpenStatic, adLockReadOnly
|
|
If adoRs.RecordCount > 0 Then
|
|
tmp_proc = "1"
|
|
else
|
|
tmp_proc = "0"
|
|
End If
|
|
adoRs.Close
|
|
'+++++++++++------------------------------------------------
|
|
if tmp_proc = "0" then
|
|
query = " "
|
|
query = query & " INSERT INTO Job_List(p_no, j_date, j_p_sn, j_contents, j_time, j_ip) VALUES "
|
|
query = query & " (" & p_no & ", '" & i & "', '99999', " & tmp_1 & ", " & tmp_2 & ", '" & Request.ServerVariables("REMOTE_ADDR") & "') "
|
|
adoconn.execute query
|
|
End if
|
|
End if
|
|
Next
|
|
End if
|
|
if rsc("문서제목") = "출퇴근보고서" and d_order_cnt = "77" Then
|
|
p_no = rsc("login_p_no") ''결재 상신자 사번
|
|
p_name = rsc("login_이름") '결재 상신자 이름
|
|
for i = 1 to 15
|
|
if not isnull(rsc("target" & i)) then
|
|
lgap = split(rsc("target" & i), "^^")
|
|
|
|
for j=0 to 5
|
|
lgap(j) = replace(lgap(j)," ","")
|
|
lgap(j) = replace(lgap(j)," ","")
|
|
next
|
|
if not isEmpty(lgap(4)) and not isnull(lgap(4)) and lgap(4) <> " " and trim(lgap(4)) <> "" then
|
|
query = "insert into login (name, p_no, [date], [time], real_time, login_out, ip, edit_reason) values ("
|
|
query = query & "'" & rsc("login_이름") & "', "
|
|
query = query & "'" & rsc("login_p_no") & "', "
|
|
query = query & "'" & lgap(0) & "', "
|
|
query = query & "'" & replace(lgap(4),":","") & "', "
|
|
query = query & "'" & FormatDateTime(date,0) & " " & FormatDateTime(time,4) & "', "
|
|
query = query & "'login-출퇴근보고서', "
|
|
query = query & "'" & Request.ServerVariables("remote_host") & "', "
|
|
query = query & "'" & lgap(3) & "-" & session("User_Number") & "') "
|
|
'Response.Write query & "<BR>"
|
|
adoConn.Execute query
|
|
end if
|
|
|
|
if not isEmpty(lgap(5)) and not isnull(lgap(5)) and lgap(5) <> " " and trim(lgap(5)) <> "" then
|
|
query = "insert into login (name, p_no, [date], [time], real_time, login_out, ip, edit_reason) values ("
|
|
query = query & "'" & rsc("login_이름") & "', "
|
|
query = query & "'" & rsc("login_p_no") & "', "
|
|
if mid(lgap(5),1,2) >= 00 and mid(lgap(5),1,2) < 06 then ''00시부터 06시 이전 퇴근이면 날짜를 1일 더하여 저
|
|
query = query & "'" & cdate(lgap(0)) + 1 & "', "
|
|
else
|
|
query = query & "'" & lgap(0) & "', "
|
|
end if
|
|
query = query & "'" & replace(lgap(5),":","") & "', "
|
|
query = query & "'" & FormatDateTime(date,0) & " " & FormatDateTime(time,4) & "', "
|
|
query = query & "'login-출퇴근보고서', "
|
|
query = query & "'" & Request.ServerVariables("remote_host") & "', "
|
|
query = query & "'" & lgap(3) & "-" & session("User_Number") & "') "
|
|
'Response.Write query & "<BR>"
|
|
adoConn.Execute query
|
|
end if
|
|
end if
|
|
next
|
|
End if
|
|
|
|
if rsc("문서제목") = "품의서" and d_order_cnt = "77" and instr(1, target99, Session("loginuser")) = false then
|
|
target99 = target99 & "^^" & Session("loginuser") & "<BR>" & replace(date(), "-", "") & "<BR>" & Session("User_Number")
|
|
target100 = target100 & "^^" & month(now()) & " / " & day(now())
|
|
end if
|
|
|
|
If rsc("문서제목") = "내근직수당지출결의서" Then
|
|
If d_order_cnt = "77" then
|
|
if rsc("d_order_cnt") <> "77" then
|
|
query = " SELECT t.p_sn, s_gubun, SUM(s_sum) as s_sum "
|
|
query = query & " FROM (select tmp.p_sn, tmp.m_name, tmp.m_jumin, tmp.work_dt, "
|
|
query = query & " case when tmp.s_gubun like '추가%' then ( "
|
|
query = query & " select top 1 s_gubun from t_neakeun_pay "
|
|
query = query & " where attribute01 = tmp.attribute01 and s_gubun not like '추가%' order by s_wan desc ) "
|
|
query = query & " else tmp.s_gubun end as s_gubun, s_sum, attribute01, attribute05 from t_neakeun_pay tmp) t "
|
|
query = query & " left outer join neakeun_work nw on t.attribute01 = nw.id "
|
|
query = query & " WHERE isnull(t.attribute05,'') = '" & rsc("d_no") & "' "
|
|
query = query & " group by s_gubun, t.p_sn "
|
|
|
|
rsp.open query, adoconn,adopenstatic, adlockreadonly
|
|
do while not rsp.eof
|
|
directQuery = " UPDATE direct_cost "
|
|
directQuery = directQuery & " set act_money = act_money + " & rsp("s_sum") & " , "
|
|
directQuery = directQuery & " cha_money = cha_money + " & rsp("s_sum") & " "
|
|
directQuery = directQuery & " where p_child_sn = '" & rsp("p_sn") & "' "
|
|
directQuery = directQuery & " and del_yes_no = 'no' and sebu = '" & rsp("s_gubun") & "' "
|
|
|
|
dbin.Open adoConn
|
|
dbin.Execute directQuery, i
|
|
dbin.Close
|
|
|
|
if i < 1 then
|
|
Query = "select 문서번호 as krc_no from 문서내용 "
|
|
query = query & " where 문서제목 = '" & replace(title, " ", "") & "' "
|
|
query = query & " and substring(문서번호,5,4) = '" & year(date) & "' "
|
|
|
|
query = query & " order by 문서번호"
|
|
|
|
Rs.open Query, adoconn,adopenstatic, adlockreadonly
|
|
|
|
if Rs.recordcount <= 0 then
|
|
krc_no = 0
|
|
else
|
|
Rs.movelast
|
|
tmpstr = split(trim(Rs("krc_no")),"-")
|
|
krc_no = tmpstr(3)
|
|
end if
|
|
Rs.close
|
|
krc_no = int(krc_no) + 1
|
|
tmpstr = "KRC-" & year(date) & "-"
|
|
tmpstr = tmpstr & "X-"
|
|
krc_no = tmpstr & ZeroFormat(krc_no,5)
|
|
|
|
Query = " insert into direct_cost(p_sn, krc_no, p_subject, hangmok, sebu, act_money, "
|
|
Query = Query & " modify_date, modify_time, modify_user, modify_user_code, modify_ip, del_yes_no, cost_type, p_child_sn) "
|
|
Query = Query & " values( "
|
|
Query = Query & " left('" & rsp("p_sn") & "',7), "
|
|
Query = Query & " '" & krc_no & "', "
|
|
Query = Query & " (select p_subject from T_PROJECT_METHOD where p_child_sn = '" & rsp("p_sn") & "'), "
|
|
Query = Query & " '49', "
|
|
Query = Query & " '" & rsp("s_gubun") & "', "
|
|
Query = Query & " '" & rsp("s_sum") & "', "
|
|
Query = Query & " convert(char(10),GETDATE(),23), "
|
|
Query = Query & " convert(char(10),GETDATE(),24), "
|
|
Query = Query & " '"& Session("loginuser") &"', "
|
|
Query = Query & " '"& Session("User_Number") &"', "
|
|
Query = Query & " '"& Session("USERIP") &"', "
|
|
Query = Query & " 'no', "
|
|
Query = Query & " 'field', "
|
|
Query = Query & " '" & rsp("p_sn") & "') "
|
|
|
|
'Response.Write "Query :" & Query
|
|
dbin.Open adoConn
|
|
dbin.Execute Query
|
|
dbin.Close
|
|
end if
|
|
rsp.movenext
|
|
loop
|
|
rsp.close
|
|
Else
|
|
alert2 "이미 결재가 완료된 문서입니다."
|
|
End if
|
|
|
|
End if
|
|
End if
|
|
'----------------------------------------------------------------------------------
|
|
If rsc("문서제목") = "면접원수당지출결의서" Then
|
|
|
|
If d_order_cnt = "77" then
|
|
|
|
query = " SELECT p_sn, s_gubun, SUM(s_sum) as s_sum "
|
|
query = query & " FROM "
|
|
query = query & " ( "
|
|
query = query & " select p_sn, m_name, m_jumin, work_dt, est_money as s_gubun, "
|
|
query = query & " case when s_gubun = 'ff' then s_pay_unit * (s_wan + add_count) + add_money else s_sum end as s_sum, "
|
|
query = query & " attribute05, confirm_yn, s_ot "
|
|
query = query & " from t_myun_pay "
|
|
query = query & " union all "
|
|
query = query & " select p_sn, m_name, m_jumin, work_dt, '교육비' as s_gubun, "
|
|
query = query & " case when s_gubun = 'ff' then s_sum - s_pay_unit * (s_wan + add_count) - add_money else 0 end as s_sum, "
|
|
query = query & " attribute05, confirm_yn, s_ot "
|
|
query = query & " from t_myun_pay "
|
|
query = query & " ) t "
|
|
query = query & " WHERE isnull(attribute05,'') = '" & d_no & "' and confirm_yn = 'Y' "
|
|
query = query & " group by s_gubun, p_sn "
|
|
|
|
rsp.open query, adoconn,adopenstatic, adlockreadonly
|
|
do while not rsp.eof
|
|
directQuery = " UPDATE direct_cost "
|
|
directQuery = directQuery & " set act_money = cast(act_money as numeric) + " & rsp("s_sum") & " , "
|
|
directQuery = directQuery & " cha_money = cast(cha_money as numeric) + " & rsp("s_sum") & " "
|
|
directQuery = directQuery & " where p_child_sn = '" & rsp("p_sn") & "' "
|
|
directQuery = directQuery & " and del_yes_no = 'no' and sebu = '" & rsp("s_gubun") & "' "
|
|
|
|
adoConn.Execute directQuery, i
|
|
|
|
if i < 1 then
|
|
Query = "select 문서번호 as krc_no from 문서내용 "
|
|
query = query & " where 문서제목 = '" & replace(title, " ", "") & "' "
|
|
query = query & " and substring(문서번호,5,4) = '" & year(date) & "' "
|
|
query = query & " order by 문서번호"
|
|
|
|
Rs.open Query, adoconn,adopenstatic, adlockreadonly
|
|
|
|
if Rs.recordcount <= 0 then
|
|
krc_no = 0
|
|
else
|
|
Rs.movelast
|
|
tmpstr = split(trim(Rs("krc_no")),"-")
|
|
krc_no = tmpstr(3)
|
|
end if
|
|
Rs.close
|
|
krc_no = int(krc_no) + 1
|
|
tmpstr = "KRC-" & year(date) & "-"
|
|
tmpstr = tmpstr & "X-"
|
|
krc_no = tmpstr & ZeroFormat(krc_no,5)
|
|
|
|
Query = " insert into direct_cost(p_sn, krc_no, p_subject, hangmok, sebu, act_money, "
|
|
Query = Query & " modify_date, modify_time, modify_user, modify_user_code, modify_ip, del_yes_no, cost_type, p_child_sn) "
|
|
Query = Query & " values( "
|
|
Query = Query & " left('" & rsp("p_sn") & "',7), "
|
|
Query = Query & " '" & krc_no & "', "
|
|
Query = Query & " (select p_subject from T_PROJECT_METHOD where p_child_sn = '" & rsp("p_sn") & "'), "
|
|
Query = Query & " '48', "
|
|
Query = Query & " '" & rsp("s_gubun") & "', "
|
|
Query = Query & " '" & rsp("s_sum") & "', "
|
|
Query = Query & " convert(char(10),GETDATE(),23), "
|
|
Query = Query & " convert(char(10),GETDATE(),24), "
|
|
Query = Query & " '"& Session("loginuser") &"', "
|
|
Query = Query & " '"& Session("User_Number") &"', "
|
|
Query = Query & " '"& Session("USERIP") &"', "
|
|
Query = Query & " 'no', "
|
|
Query = Query & " 'field', "
|
|
Query = Query & " '" & rsp("p_sn") & "') "
|
|
|
|
adoConn.Execute Query
|
|
end if
|
|
rsp.movenext
|
|
loop
|
|
rsp.close
|
|
End if
|
|
End if
|
|
'----------------------------------------------------------------------------------
|
|
|
|
If rsc("문서제목") = "프로젝트계약액수정" Then
|
|
If d_order_cnt = "77" then
|
|
query = " update t_project_method "
|
|
query = query & " set p_cont_cost = '"& rsc("target1") &"' "
|
|
query = query & " where p_child_sn = '"& rsc("p_sn") &"' "
|
|
|
|
adoconn.execute query
|
|
|
|
query = " update t_project_base "
|
|
query = query & " set p_total_cost = '"& rsc("target5") &"' "
|
|
query = query & " where p_sn = '"& left(rsc("p_sn"), 7) &"' "
|
|
|
|
adoconn.execute query
|
|
end if
|
|
end if
|
|
|
|
If rsc("문서제목") = "기기예약신청서" Then
|
|
If d_order_cnt = "77" then
|
|
query = " "
|
|
query = query & " Update Krc_device "
|
|
query = query & " Set T_STATUS = 'RES' "
|
|
query = query & " Where KRC_NO = '" & d_no & "' "
|
|
query = query & " And T_USE_YN = 'Y' "
|
|
|
|
adoconn.execute query
|
|
end if
|
|
end if
|
|
|
|
If rsc("문서제목") = "예상직접비보고서" Then
|
|
p_sn = request("p_sn")
|
|
p_method_cd = request("p_method_cd")
|
|
complete = request("complete")
|
|
cost_type = request("cost_type")
|
|
|
|
sql = "select * from person where p_no = '" & rsc("login_p_no") & "'"
|
|
'Response.Write sql & "<br>"
|
|
Rs.open sql, adoconn, adopenstatic, adlockreadonly
|
|
user_team = rs("p_team")
|
|
Rs.close
|
|
|
|
if Instr(p_method_cd,"@") > 0 then
|
|
list_p_sn = split(p_method_cd,"@")
|
|
p_method_cd = list_p_sn(0)
|
|
p_child_sn = list_p_sn(1)
|
|
end if
|
|
If d_order_cnt = "77" then
|
|
query = " SELECT p_sn, p_method_cd , p_child_sn, p_sub_type, p_input_complete "
|
|
query = query & " FROM T_PROJECT_METHOD "
|
|
query = query & " WHERE p_sn = '"& p_sn &"' "
|
|
query = query & " AND p_child_sn = '"& p_child_sn &"' "
|
|
|
|
|
|
adors.Open query, adoconn, 1
|
|
|
|
do while not adors.EOF
|
|
if complete = "yes" and cost_type = "field" then
|
|
if user_team = "8" then
|
|
'complete_str = mid(adors("p_input_complete"),1,1) & mid(adors("p_input_complete"),2,1) & "o"
|
|
complete_str = mid(adors("p_input_complete"),1,1) & "o" & mid(adors("p_input_complete"),3,1) ' QC가 올려도 SV가 올린 것처럼..
|
|
Else
|
|
complete_str = mid(adors("p_input_complete"),1,1) & "o" & mid(adors("p_input_complete"),3,1)
|
|
end if
|
|
elseif complete = "yes" and cost_type = "research" then
|
|
complete_str = "o" & mid(adors("p_input_complete"),2,1) & mid(adors("p_input_complete"),3,1)
|
|
elseif complete = "cancle" and cost_type = "field" then
|
|
if user_team = "8" then
|
|
'complete_str = mid(adors("p_input_complete"),1,1) & mid(adors("p_input_complete"),2,1) & "x"
|
|
complete_str = mid(adors("p_input_complete"),1,1) & "x" & mid(adors("p_input_complete"),3,1) ' QC가 올려도 SV가 올린 것처럼..
|
|
Else
|
|
complete_str = mid(adors("p_input_complete"),1,1) & "x" & mid(adors("p_input_complete"),3,1)
|
|
end if
|
|
elseif complete = "cancle" and cost_type = "research" then
|
|
complete_str = "x" & mid(adors("p_input_complete"),2,1) & mid(adors("p_input_complete"),3,1)
|
|
end If
|
|
|
|
if complete = "yes" OR complete = "cancle" then
|
|
query = " UPDATE T_PROJECT_METHOD "
|
|
query = query & " SET p_input_complete = '"& complete_str &"' "
|
|
query = query & " WHERE p_sn = '"& p_sn &"' "
|
|
query = query & " AND p_child_sn = '"& adors("p_child_sn") &"' "
|
|
end if
|
|
|
|
adoConn.execute query
|
|
|
|
adors.movenext
|
|
loop
|
|
adors.close
|
|
|
|
if complete_str = "oooo" Or complete_str = "ooo" then
|
|
'알람기능 추가 ***********************************************
|
|
query = ""
|
|
query = query & " insert into Intranet_Alarm Values "
|
|
query = query & " ( "
|
|
query = query & " '" & p_child_sn & "', "
|
|
query = query & " '', "
|
|
query = query & " '진행상태가 결재상신 가능으로', "
|
|
query = query & " '', "
|
|
query = query & " '', "
|
|
query = query & " (SELECT TOP 1 cast(p2.p_no as varchar) +','+ cast(p.p_no as varchar) "
|
|
query = query & " FROM T_PROJECT_BASE tpb INNER JOIN person p ON tpb.p_input_user = p.p_no "
|
|
query = query & " INNER JOIN (select p_no, p_depart, p_team_place, p_resign from person) p2 ON p.p_depart = p2.p_depart and p2.p_resign = '0' "
|
|
query = query & " WHERE tpb.p_sn = '" & p_sn & "' and p2.p_team_place between '0' and '5' "
|
|
query = query & " ORDER BY p2.p_team_place DESC) "
|
|
query = query & " ) "
|
|
|
|
adoConn.execute query
|
|
end if
|
|
end if
|
|
end if
|
|
|
|
|
|
|
|
'//-- hwkim 20230215 test
|
|
'response.write "<br> tmp = "& ubound(tmp)
|
|
'response.write "<br> i = "& i
|
|
'response.write "<br> ubound(tmp) + 1 = "& (ubound(tmp) + 1 )
|
|
'response.write "<br> d_order_cnt = "& d_order_cnt
|
|
'response.write "<br> target99 = " & target99
|
|
'response.write "<br> target100 = " & target100
|
|
'response.write "<br>"
|
|
'response.end
|
|
|
|
query = " UPDATE Document "
|
|
query = query & " SET "
|
|
query = query & " d_order_cnt = '" & d_order_cnt & "', "
|
|
query = query & " d_orders = '" & d_orders & "' "
|
|
query = query & "WHERE d_no = '" & d_no & "' "
|
|
|
|
'if rsc("문서제목") = "품의서" and d_order_cnt = "77" then
|
|
' response.write query
|
|
'end if
|
|
'response.end
|
|
|
|
'//--
|
|
if rsc("문서제목") = "품의서" and d_order_cnt = "77" then
|
|
'if instr(1, target99, "박준빈") and instr(1, target99, "조우철") then
|
|
if instr(1, target99, "박준빈") or instr(1, target99, "조우철") then '//-- hwkim 20230215
|
|
dbin.Open adoConn
|
|
dbin.Execute query
|
|
dbin.Close
|
|
end if
|
|
else
|
|
dbin.Open adoConn
|
|
dbin.Execute query
|
|
dbin.Close
|
|
end if
|
|
|
|
|
|
query = " UPDATE 문서내용 "
|
|
query = query & " SET "
|
|
query = query & " target99 = '" & target99 & "', "
|
|
query = query & " target100 = '" & target100 & "' "
|
|
query = query & " WHERE 문서번호 = '" & d_no & "' "
|
|
|
|
dbin.Open adoConn
|
|
dbin.Execute query
|
|
dbin.Close
|
|
|
|
'부재 버튼 클릭하였을 때 document_pass 테이블에 삽입
|
|
if approve_pass = "1" then
|
|
query = "INSERT INTO [Document_pass] "
|
|
query = query & "(d_no, d_name, d_orders, d_write_date, d_view, d_delok) "
|
|
query = query & "VALUES "
|
|
query = query & "('" & d_no & "', "
|
|
query = query & " '" & rsc("d_name") & "', "
|
|
query = query & " '" & tmp_pass_psn & "', "
|
|
query = query & " '" & date() & "', "
|
|
query = query & " 'Y', "
|
|
query = query & " 'N') "
|
|
|
|
adoConn.execute query
|
|
end if
|
|
|
|
''로그저장
|
|
query = "insert into 문서내용_log (문서번호, 문서제목, 대상자_p_no, 대상자_이름, 내용,"
|
|
query = query & " 발급일, 발급시각, 발급자_p_no, 발급자_이름, 발급자_ip) values ( "
|
|
query = query & "'" & d_no & "', "
|
|
query = query & "'" & replace(title, " ", "") & "', "
|
|
query = query & "'" & Session("User_Number") & "', "
|
|
query = query & "'" & Session("loginuser") & "', "
|
|
query = query & "'문서결재', "
|
|
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
|
query = query & "'" & time() & "', "
|
|
query = query & "'', '', "
|
|
query = query & "'" & Session("USERIP") & "')"
|
|
|
|
if Request.ServerVariables("REMOTE_ADDr") = session("admin_ip") then
|
|
else
|
|
adoconn.execute query
|
|
end if
|
|
%>
|
|
<html>
|
|
<head>
|
|
<title>
|
|
|
|
</title>
|
|
<script language=javascript>
|
|
function goit() {
|
|
alert('승인되었습니다');
|
|
opener.location.reload();
|
|
self.close();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onLoad="goit()">
|
|
<form name="pms" method="post">
|
|
<input type="hidden" name="p_sn" value="<%=p_sn%>">
|
|
</body>
|
|
</html>
|
|
<%
|
|
else
|
|
alert2 "이미 결재가 완료된 문서입니다."
|
|
end if
|
|
else
|
|
alert2 "DB 에러. 관리자에게 문의하세요"
|
|
end if 'if rsc.RecordCount > 0 then
|
|
rsc.Close
|
|
%> |