324 lines
19 KiB
Plaintext
324 lines
19 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<%
|
|
dim command
|
|
command = Request("command")
|
|
|
|
s_date_st = request("s_date_st")
|
|
s_date_end = request("s_date_end")
|
|
s_name = request("s_name")
|
|
s_p_sn = request("s_p_sn")
|
|
s_p_subject = request("s_p_subject")
|
|
s_column = replace(request("s_column"), " ", "")
|
|
|
|
Dim column_dic
|
|
Set column_dic = Server.CreateObject("Scripting.Dictionary")
|
|
With column_dic
|
|
.Add "intranet_project", "인트라넷프로젝트"
|
|
.Add "p_child_sn", "FCS프로젝트"
|
|
.Add "p_subject", "프로젝트명"
|
|
.Add "work_kind", "업무구분"
|
|
.Add "m_name", "면접원 성명"
|
|
.Add "s_area", "지역"
|
|
.Add "s_type", "설문Type"
|
|
.Add "inspection_user_name", "검증원 성명"
|
|
.Add "r_date", "이관날짜"
|
|
.Add "sum_esc", "이관부수"
|
|
.Add "sum_tok", "TOK"
|
|
.Add "sum_pass", "PASS"
|
|
.Add "sum_err", "ERR"
|
|
.Add "sum_notel", "NOTEL"
|
|
End With
|
|
|
|
if command <> "excel" then
|
|
%>
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<style>
|
|
.t_table .t_head{
|
|
cursor:pointer;
|
|
}
|
|
</style>
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>FF 면접원 현황</h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<%
|
|
End If
|
|
if command = "excel" then
|
|
Response.ContentType = "application/vnd.ms-excel"
|
|
Response.AddHeader "Content-Disposition","attachment;filename=FF_Status.xls"
|
|
end if
|
|
%>
|
|
<form name="interviewer_status" method="post">
|
|
<input type="hidden" value="<%=command %>" name="command" />
|
|
<input type="hidden" value="<%=s_column %>" name="s_column_arr" />
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<% If command <> "excel" Then %>
|
|
<tr>
|
|
<td align="center" width="12%">기 간</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_st %>" name="s_date_st" class='selectDate' readonly />
|
|
~
|
|
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_end %>" name="s_date_end" class='selectDate' readonly />
|
|
</td>
|
|
<td align="center" width="12%">면접원 성명</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_name" value="<%=s_name %>" style="width:200px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" width="12%">프로젝트 코드</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_p_sn" value="<%=s_p_sn %>" style="width:200px;"/>
|
|
</td>
|
|
<td align="center" width="12%">프로젝트 명</td>
|
|
<td align="left" width="38%">
|
|
<input type="text" name="s_p_subject" value="<%=s_p_subject %>" style="width:200px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" width="12%">집계 Column 선택</td>
|
|
<td align="left" width="88%" colspan="3">
|
|
<label class='mx-2' for="r_date"><input type="checkbox" value="r_date" id="r_date" name="s_column"/> 이관날짜</label>
|
|
<label class='mx-2' for="intranet_project"><input type="checkbox" value="intranet_project" id="intranet_project" name="s_column"/> 인트라넷프로젝트</label>
|
|
<label class='mx-2' for="p_child_sn"><input type="checkbox" value="p_child_sn,p_subject" id="p_child_sn" name="s_column"/> FCS프로젝트</label>
|
|
<label class='mx-2' for="s_area"><input type="checkbox" value="s_area" id="s_area" name="s_column"/> 지역</label>
|
|
<label class='mx-2' for="s_type"><input type="checkbox" value="s_type" id="s_type" name="s_column"/> 설문Type</label>
|
|
<label class='mx-2' for="m_name"><input type="checkbox" value="m_name" id="m_name" name="s_column"/> 면접원 성명</label>
|
|
<label class='mx-2' for="inspection_user_name"><input type="checkbox" value="inspection_user_name" id="inspection_user_name" name="s_column"/> 검증원 성명</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" align="right"><font color="red"><b>검색 시 1분에서 10분 가량 소요될 수 있습니다</b></font></td>
|
|
<td colspan="1" align="right">
|
|
<a href="javascript:search_go('view');"><img src="/images/common/btn_smallsrch.gif" /></a>
|
|
<a href="javascript:search_go('excel');"><img src="/images/common/btn_smallexcel.gif" /></a>
|
|
</td>
|
|
</tr>
|
|
<% End if %>
|
|
<% if command <> "" Then %>
|
|
<tr>
|
|
<td colspan="4" align="center">
|
|
<div style="width:100%;overflow-y:scroll;max-height:545px;height:545px;">
|
|
<table class="t_table table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<%
|
|
query = " SELECT "
|
|
if s_column <> "" Then
|
|
query = query & " " & s_column & ", "
|
|
else
|
|
query = query & " intranet_project, p_subject, m_name, "
|
|
End if
|
|
query = query & " SUM(esc_cnt) as sum_esc, SUM(tok_cnt) as sum_tok, SUM(err_cnt) as sum_err, SUM(no_tel) as sum_notel, SUM(pass_cnt) as sum_pass "
|
|
query = query & " FROM "
|
|
query = query & " ( "
|
|
query = query & " SELECT TPF.p_subject, CASE WHEN TPF.intranet_project = '' THEN TPF.p_child_sn ELSE TPF.intranet_project END as intranet_project, "
|
|
query = query & " TPF.p_child_sn, R.r_date, R.s_area, R.s_type, "
|
|
query = query & " R.m_name, R.m_no, "
|
|
query = query & " 1 as esc_cnt, "
|
|
query = query & " CASE WHEN TIR.r_result = '1' AND TIR.qc_stat = 'OK' THEN 1 ELSE 0 END as tok_cnt, "
|
|
query = query & " CASE WHEN TIR.r_result <> '1' AND TIR.pass_stat = 'PASS' THEN 1 ELSE 0 END as pass_cnt, "
|
|
query = query & " CASE WHEN TIR.pass_stat = 'ERROR' THEN 1 ELSE 0 END as err_cnt, "
|
|
query = query & " CASE WHEN TIR.r_result IN ('5', '6', '7') AND TIR.pass_stat NOT IN ('ERROR', 'PASS') THEN 1 ELSE 0 END as no_tel, "
|
|
query = query & " ISNULL(M.m_name, ISNULL(P.p_name, '')) as inspection_user_name, ISNULL(TIR.inspection_user, '') as inspection_user, CONVERT(VARCHAR(10), TIR.inspection_date, 120) as inspection_date "
|
|
query = query & " FROM RES R WITH(NOLOCK) "
|
|
query = query & " LEFT OUTER JOIN T_INSPECTION_RES TIR WITH(NOLOCK) ON R.r_sn = TIR.r_sn "
|
|
query = query & " LEFT OUTER JOIN V_PROJECT_FCS TPF WITH(NOLOCK) ON R.p_sn = TPF.p_child_sn "
|
|
query = query & " LEFT OUTER JOIN Man M WITH(NOLOCK) ON TIR.inspection_user = M.id "
|
|
query = query & " LEFT OUTER JOIN Person P WITH(NOLOCK) ON TIR.inspection_user = P.p_no "
|
|
query = query & " WHERE DelGubun = 'N' AND r_error IS NULL AND s_error IS NULL AND m_error IS NULL AND q_error IS NULL "
|
|
query = query & " ) T "
|
|
query = query & " WHERE r_date BETWEEN '" & s_date_st & "' AND '" & s_date_end & "' "
|
|
If s_name <> "" Then
|
|
query = query & " AND m_name LIKE '%" & s_name & "%' "
|
|
End If
|
|
If s_p_sn <> "" Then
|
|
query = query & " AND intranet_project LIKE '" & s_p_sn & "%' "
|
|
End If
|
|
If s_p_subject <> "" Then
|
|
query = query & " AND p_subject LIKE '%" & s_p_subject & "%' "
|
|
End If
|
|
if s_column <> "" Then
|
|
query = query & " GROUP BY " & s_column & " "
|
|
query = query & " ORDER BY " & s_column & " "
|
|
Else
|
|
query = query & " GROUP BY intranet_project, p_subject, m_name "
|
|
query = query & " ORDER BY intranet_project, p_subject, m_name "
|
|
End if
|
|
'response.Write query
|
|
AdoRs.open query, adoconn, adopenstatic, adlockreadonly
|
|
|
|
If AdoRs.RecordCount > 0 Then
|
|
%>
|
|
<tr height="25px" class="t_head">
|
|
<%
|
|
For i = 0 To AdoRs.fields.count - 1
|
|
%>
|
|
<td align="center"><%= column_dic.Item(AdoRs.fields(i).Name)%> </td>
|
|
<%
|
|
Next
|
|
%>
|
|
</tr>
|
|
<%
|
|
Else
|
|
%>
|
|
<tr height="25px">
|
|
<td align="center" width="100%">검색 결과가 없습니다</td>
|
|
</tr>
|
|
<%
|
|
End If
|
|
|
|
Do While Not AdoRs.Eof
|
|
%>
|
|
<tr class="t_contents">
|
|
<%
|
|
For i = 0 To AdoRs.fields.count - 1 ' 원래 - 1 만 해야되는데, 마지막 컬럼 cnt 에 Detail 화면 링크를 걸기위해 조정
|
|
%>
|
|
<td align="center" style=""><%= AdoRs.fields(i) %></td>
|
|
<%
|
|
Next
|
|
%>
|
|
</tr>
|
|
<%
|
|
AdoRs.MoveNext
|
|
Loop
|
|
%>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% End if %>
|
|
</table>
|
|
</form>
|
|
<%if command <> "excel" then%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
$(function () {
|
|
$(".selectDate").datepicker();
|
|
if ($("input[name=s_column_arr]").val() != "") {
|
|
$("input[name=s_column]").each(function (i) {
|
|
if ($("input[name=s_column_arr]").val().indexOf($(this).val()) > -1) {
|
|
$(this).prop("checked", true);
|
|
}
|
|
});
|
|
}
|
|
var sort_col_check = [];
|
|
$(".t_table .t_head td").each(function (index) {
|
|
sort_col_check[index] = 0; // 1은 asc, 2는 desc, 0은 초기
|
|
});
|
|
$(".t_table .t_head td").click(function () {
|
|
// $(".t_table .t_head td").index(this) 클릭한 컬럼의 INDEX
|
|
// $(".t_table .t_head > td").length tr의 column 수
|
|
// $(".t_table .t_contents").length tr의 row 수
|
|
// var arr_tb = new array($(".t_table .t_contents").length, $(".t_table .t_head > td").length);
|
|
var num_yn = true;
|
|
var equal_value = true;
|
|
var prev_value = "";
|
|
var s_col_index = $(".t_table .t_head td").index(this);
|
|
var arr_tb = [];
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
sort_col_check[s_col_index] = 2;
|
|
} else {
|
|
sort_col_check[s_col_index] = 1;
|
|
}
|
|
$(".t_table .t_contents").each(function (tr_i) {
|
|
arr_tb[tr_i] = $(this).find("td").eq(s_col_index).text();
|
|
if (prev_value == "") {
|
|
prev_value = arr_tb[tr_i];
|
|
}
|
|
if (prev_value != arr_tb[tr_i]) {
|
|
equal_value = false;
|
|
}
|
|
if (isNaN(arr_tb[tr_i]) == true) {
|
|
num_yn = false;
|
|
}
|
|
$(this).find("td").each(function (td_i) {
|
|
if (td_i != s_col_index) {
|
|
arr_tb[tr_i] = arr_tb[tr_i] + "^||^" + $(this).text();
|
|
}
|
|
});
|
|
});
|
|
if (equal_value != true) { // 컬럼의 모든 값이 같지 않아야 Sort 진행
|
|
if (num_yn == true) { // 숫자일 때 정렬
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
arr_tb.sort(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // 숫자 정렬 Asc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▼");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
} else if (sort_col_check[s_col_index] == 2) {
|
|
arr_tb.reverse(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // 숫자 정렬 Desc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▲");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
}
|
|
} else { // 문자일 때 정렬
|
|
if (sort_col_check[s_col_index] == 1) {
|
|
arr_tb.sort(); // 문자 정렬 Asc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▼");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
} else if (sort_col_check[s_col_index] == 2) {
|
|
arr_tb.reverse(); // 문자 정렬 Desc
|
|
$(".t_table .t_head td").each(function (e) {
|
|
if (e == s_col_index) {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", "") + "▲");
|
|
} else {
|
|
$(this).text($(this).text().replace("▲", "").replace("▼", ""));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
$(".t_table .t_contents").each(function (tr_i) {
|
|
var tmp_arr = arr_tb[tr_i].split("^||^");
|
|
var chk_ind = 0;
|
|
$(this).find("td").eq(s_col_index).text(tmp_arr[0]);
|
|
for (var i = 0; i < tmp_arr.length; i++) {
|
|
if (i != s_col_index) {
|
|
chk_ind = chk_ind + 1;
|
|
$(this).find("td").eq(i).text(tmp_arr[chk_ind]);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
function search_go(command) {
|
|
var frm = document.interviewer_status;
|
|
if (frm.s_date_st.value == "" || frm.s_date_end.value == "") {
|
|
alert("기간을 선택해주세요");
|
|
return;
|
|
}
|
|
frm.action = "./interviewer_status.asp?command=" + command;
|
|
frm.submit();
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" -->
|
|
<% end if %> |