Files
KIN/inspection/cins_cnt.asp
2025-09-29 17:55:08 +09:00

61 lines
3.1 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
Response.CharSet = "EUC-KR"
dim prj_code : prj_code = Request("prj_code")
dim prj_name : prj_name = unescape(Request("prj_name"))
%>
<form id="prj_search" method="post">
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="center" colspan="5">(<%=prj_code %>) <%=prj_name %></td>
</tr>
<tr>
<td align="center" >검증원</td>
<td align="center" >근무일자</td>
<td align="center" >완료</td>
<td align="center" >에러</td>
<td align="center" >재감청</td>
</tr>
<%
query = ""
query = query &" select AA.* from "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select prj_code, tel_inspection_user as n_name, n_birth, tel_inspection_date as n_date, "&VbCrlf
query = query &" count(case when b.tel_del_yn='N' and b.tel_result = '1' then '1' end) as t_cnt, "&VbCrlf
query = query &" count(case when b.tel_del_yn='Y' and b.tel_result = '2' then '2' end) as r_cnt, "&VbCrlf
query = query &" count(case when b.tel_del_yn='N' and b.tel_result = '2' then '3' end) as e_cnt "&VbCrlf
query = query &" from "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select (select intranet_project from new_cati.dbo.project where prj_code = a.prj_code) as prj_code, tel_inspection_user, "&VbCrlf
query = query &" case "&VbCrlf
query = query &" when len(tel_inspection_uid) = 8 then (select p_no from project2.dbo.person where p_no=tel_inspection_uid) "&VbCrlf
query = query &" else (select left(m_jumin,6) from project2.dbo.man where id=tel_inspection_uid) "&VbCrlf
query = query &" end as n_birth, "&VbCrlf
query = query &" convert(varchar,tel_inspection_date,23) as tel_inspection_date, "&VbCrlf
query = query &" tel_del_yn, tel_result "&VbCrlf
query = query &" from new_cati.dbo.T_INSPECTION_CATI as a "&VbCrlf
query = query &" where a.tel_del_yn <> '' and a.tel_inspection_user <> '' "&VbCrlf
query = query &" ) as b "&VbCrlf
query = query &" group by b.prj_code, b.tel_inspection_user, b.n_birth, b.tel_inspection_date "&VbCrlf
query = query &" ) as AA "&VbCrlf
query = query &" where AA.prj_code = '" & prj_code & "' "&VbCrlf
query = query &" order by AA.prj_code, AA.n_name, AA.n_birth "&VbCrlf
Rs.open query, adoconn, adopenstatic, adlockreadonly
while not rs.eof
%>
<tr class="prj_pick">
<td class='text-center'><%=Rs("n_name") %></td>
<td class='text-center'><%=Rs("n_date") %></td>
<td class='text-center'><%=Rs("t_cnt") %></td>
<td class='text-center'><%=Rs("e_cnt") %></td>
<td class='text-center'><%=Rs("r_cnt") %></td>
</tr>
<%
rs.movenext
wend
Rs.close
%>
</table>
</form>