305 lines
13 KiB
Plaintext
305 lines
13 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
dim pn_code : pn_code=replace(replace(replace(replace(request.form("pn_code"),"'",""),"""","")," ","")," ","")
|
|
dim p_title : p_title=replace(replace(request.form("p_title"),"'",""),"""","")
|
|
|
|
dim create_ck
|
|
|
|
select case request.form("p_insert")
|
|
case "ok" '-- 펀칭 프로젝트 등록
|
|
'-- 펀칭(FCS) 코드중복 체크
|
|
sql=" select p_index from T_PROJECT_FCS "
|
|
sql=sql&" where p_child_sn='"&pn_code&"' "
|
|
Rs.Open sql, adoConn, 1
|
|
if Rs.eof then '-- 펀칭(FCS) 코드 등록
|
|
'-- 정보 가져오기 ---------------------------------------
|
|
dim x_method_cd, x_sn, x_child_sn
|
|
tsql=""
|
|
tsql=tsql&" select * from dbo.T_PROJECT_METHOD "
|
|
tsql=tsql&" where p_child_sn='"&request.form("p_child_sn")&"' "
|
|
Adors.Open tsql, adoConn, 1
|
|
x_method_cd=Adors("p_method_cd")
|
|
x_sn=Adors("p_sn")
|
|
x_child_sn=Adors("p_child_sn")
|
|
Adors.close
|
|
|
|
'-- fcs 프로젝트 등록
|
|
tsql=""
|
|
tsql=tsql&" INSERT INTO dbo.T_PROJECT_FCS (p_method_cd,p_sn,intranet_project,p_child_sn,p_subject,p_rsch_dept,p_progress_status) "
|
|
tsql=tsql&" VALUES "
|
|
tsql=tsql&" ('"&x_method_cd&"' "
|
|
tsql=tsql&" ,'"&x_sn&"' "
|
|
tsql=tsql&" ,'"&x_child_sn&"' "
|
|
tsql=tsql&" ,'"&pn_code&"' "
|
|
tsql=tsql&" ,'"&p_title&"' "
|
|
tsql=tsql&" ,'0' "
|
|
tsql=tsql&" ,'008' "
|
|
tsql=tsql&" ) "
|
|
adoconn.execute tsql
|
|
'-- fcs >> 펀칭 처리용 insert
|
|
tsql=""
|
|
tsql=tsql&" INSERT INTO dbo.T_PROJECT_PUNCHING (P_SN,punching_type,real_time_matching) "
|
|
tsql=tsql&" VALUES "
|
|
tsql=tsql&" ('"&pn_code&"','0','1') "
|
|
adoconn.execute tsql
|
|
'-- fcs 프로젝트 코드 : 등록완료
|
|
create_ck="ok_code"
|
|
else
|
|
'-- 펀칭(FCS) 코드중복
|
|
create_ck="dubble"
|
|
end if
|
|
Rs.close
|
|
end select
|
|
%>
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1>펀칭 등록 및 데이터 이관</h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<form method='post' id='xform' name='xform' onload="javascript:fn_press('1');" onclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}" ondblclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}" >
|
|
<input type="hidden" name="p_child_sn" id="p_child_sn" value="" />
|
|
<input type="hidden" name="p_insert" id="p_insert" value="" />
|
|
<input type="hidden" name="fn_id" id="fn_id" value="" />
|
|
<table id= "searchTable1" class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td align=right colspan="2"><input type="button" name="xbtn" value=" 펀처 등록하기 " style="width:130px;cursor:pointer;" onclick="javascript:js_punching_user(xform);" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="230px" align="center">(비용처리 될) 인트라넷 프로젝트</td>
|
|
<td>
|
|
<input type="text" style="width:99%;" name="p_subject" id="p_subject" value='' onclick="winnewoepn();" readonly>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table id= "searchTable2" class="table table-sm table-sm2 table-bordered table-head tr-colors" style='display:none;' >
|
|
<tr>
|
|
<td colspan="2"><b> FCS 프로젝트 등록 </b></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="230px" align="center">FCS 프로젝트 코드 입력</td>
|
|
<td >
|
|
<input type="text" style="width:99%;" name="pn_code" id="pn_code" value='' >
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">FCS 프로젝트명 입력</td>
|
|
<td >
|
|
<input type="text" style="width:99%;" name="p_title" id="p_title" value='' >
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align=right colspan="2" >
|
|
<input type="button" value="FCS 프로젝트 등록" name="t_create_pj_btn" onclick="javascript:js_create_pj(xform);" style="cursor:pointer;" >
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td width="200px" align="center" height="24" style="word-break:break-all;" >조사방법</td>
|
|
<td align="center" height="24" style="word-break:break-all;" >프로젝트 정보</td>
|
|
<td width="250px" align="center" height="24" style="word-break:break-all;" >FCS 프로젝트코드</td>
|
|
<td width="320px" align="center" height="24" style="word-break:break-all;" > 관 리</td>
|
|
</tr>
|
|
<%
|
|
'-- list 출력
|
|
dim acnt : acnt=1
|
|
dim tocolor : tocolor=""
|
|
|
|
tsql=""
|
|
tsql=tsql&" select "
|
|
tsql=tsql&" A.*, B.intra_subject, C.p_method_nm, "
|
|
tsql=tsql&" '<font color=#000000><b>인트)</b></font> [<font color=#000000><b>'+A.intranet_project+'</b></font>] '+B.intra_subject+"
|
|
tsql=tsql&" '<br><font color=blue><b>FCS)</b></font> [<font color=blue><b>'+A.pn_prjcode+'</b></font>] '+A.pn_subject as all_title, "
|
|
tsql=tsql&" isnull(D.fcs_cnt,0) as fcs_cnt "
|
|
tsql=tsql&" from "
|
|
'####################################################
|
|
tsql=tsql&" ( "
|
|
tsql=tsql&" select AA.intranet_project, AA.p_child_sn as pn_prjcode, AA.p_subject as pn_subject from "
|
|
tsql=tsql&" ( "
|
|
tsql=tsql&" select "
|
|
tsql=tsql&" intranet_project, p_sn, p_child_sn, p_subject, p_method_cd, p_method_nm, allocation_cnt, depcol_cnt, "
|
|
tsql=tsql&" collection_cnt, escalation_cnt, error_cnt, complete_cnt, "
|
|
tsql=tsql&" case when complete_cnt = 0 then 0.00 else "
|
|
tsql=tsql&" case when escalation_cnt = 0 then 0.00 else round(convert(float, complete_cnt)/escalation_cnt * 100, 2) end end as tok_rating, "
|
|
tsql=tsql&" case when error_cnt = 0 then 0.00 else case when escalation_cnt = 0 then 0.00 else round(convert(float, error_cnt)/escalation_cnt * 100, 2) end "
|
|
tsql=tsql&" end as error_rating, p_progress from "
|
|
tsql=tsql&" (select tpm.intranet_project, tpm.p_sn, tpm.p_child_sn, tpm.p_subject, tpm.p_method_cd, tpc.p_method_nm, "
|
|
tsql=tsql&" isnull(al.allocation_cnt,0) as allocation_cnt, isnull(de.depcol_cnt,0) as depcol_cnt, "
|
|
tsql=tsql&" isnull(co.collection_cnt,0) as collection_cnt, isnull(al.escalation_cnt,0) as escalation_cnt, "
|
|
tsql=tsql&" isnull(al.error_cnt,0) as error_cnt, isnull(al.complete_cnt,0) as complete_cnt, case when isnull(tpm.p_qc_complete,'3') = '3' then "
|
|
tsql=tsql&" case when al.allocation_cnt > 0 then '2' else '3' end else '1' end as p_progress "
|
|
tsql=tsql&" from V_PROJECT_FCS_LIST tpm "
|
|
tsql=tsql&" left join t_project_method_cd tpc "
|
|
tsql=tsql&" on tpm.p_method_cd = tpc.p_method_cd "
|
|
tsql=tsql&" left join ( select intranet_project, sum(q_allocation) as allocation_cnt, "
|
|
tsql=tsql&" sum(q_escalation) as escalation_cnt, sum(q_error) as error_cnt, sum(q_complete) as complete_cnt "
|
|
tsql=tsql&" from T_QUOTA_TABLE group by intranet_project ) al on tpm.p_child_sn = al.intranet_project "
|
|
tsql=tsql&" left join ( select p_child_sn, SUM(depcol_cnt) as depcol_cnt, use_yn, dep_col from T_DEPCOL "
|
|
tsql=tsql&" group by p_child_sn, use_yn, dep_col ) de on tpm.p_child_sn = de.p_child_sn and de.use_yn='y' and de.dep_col='deploy' "
|
|
tsql=tsql&" left join ( select p_child_sn, SUM(collection_cnt) as collection_cnt, use_yn from T_COLLECTION group by p_child_sn, use_yn ) co "
|
|
tsql=tsql&" on tpm.p_child_sn = co.p_child_sn and co.use_yn='y' "
|
|
tsql=tsql&" where tpm.p_progress_status >= '008' and tpm.p_field_complete is null ) s "
|
|
tsql=tsql&" ) AA "
|
|
tsql=tsql&" where len(AA.intranet_project)>0 "
|
|
tsql=tsql&" ) A "
|
|
'####################################################
|
|
tsql=tsql&" left join "
|
|
tsql=tsql&" (select p_method_cd,p_sn, p_child_sn, p_subject as intra_subject from [dbo].[T_PROJECT_METHOD] ) B "
|
|
tsql=tsql&" on A.intranet_project=B.p_child_sn "
|
|
tsql=tsql&" left join "
|
|
tsql=tsql&" (select p_method_cd, p_method_nm from [dbo].[T_PROJECT_METHOD_CD]) C "
|
|
tsql=tsql&" on B.p_method_cd=C.p_method_cd "
|
|
tsql=tsql&" left join "
|
|
tsql=tsql&" ( "
|
|
tsql=tsql&" select p_sn, count(p_sn) as fcs_cnt from [dbo].[res] with(nolock) "
|
|
tsql=tsql&" where DelGubun='N' "
|
|
tsql=tsql&" group by p_sn "
|
|
tsql=tsql&" ) D "
|
|
tsql=tsql&" on A.pn_prjcode=D.p_sn "
|
|
tsql=tsql&" where B.p_method_cd is not null "
|
|
'response.write tsql
|
|
Adors.Open tsql, adoConn, 1
|
|
while not Adors.Eof
|
|
%>
|
|
<tr height="24">
|
|
<td align="center" class='align-middle' ><%=Adors("p_method_nm")%></td>
|
|
<td align="left" ><%=Adors("all_title")%></td>
|
|
<td align="center" class='align-middle' ><font color=blue><b><%=Adors("pn_prjcode")%></b></font></td>
|
|
<td align="center" class='align-middle' >
|
|
<input type="button" value=" 펀칭 데이터 이관 " name="t_create_pj_btn" onclick="js_fcs_press('<%= Adors("pn_prjcode") %>');" style="cursor:pointer" >
|
|
<input type="button" value=" 라벨 임의등록 " name="t_label_pj_btn" onclick="js_fcs_label('<%= Adors("pn_prjcode") %>');" style="cursor:pointer" >
|
|
</td>
|
|
</tr>
|
|
<%
|
|
Adors.movenext
|
|
Wend
|
|
Adors.Close
|
|
%>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function winnewoepn() {
|
|
var url = "/project_list/project_punching_list.ASP";
|
|
|
|
var pwidth=850;
|
|
var pheight=600;
|
|
var tleft=(screen.width-pwidth)/2;
|
|
var ttop=(screen.height-pheight)/2;
|
|
|
|
winObj=window.open(url, "wins", "left="+tleft+", top="+ttop+", menubar=no, location=no, status=no, toolbar=no, width="+pwidth+", height="+pheight+", scrollbars=yes ,resizable=no");
|
|
}
|
|
|
|
function js_create_pj(x){
|
|
if(x.p_child_sn.value==""){
|
|
alert("인트라넷 프로젝트 정보가 없습니다. 프로젝트를 다시 선택하여 주세요.");
|
|
return;
|
|
}
|
|
if(x.pn_code.value==""){
|
|
alert("펀칭 프로젝트코드를 입력하여 주세요");
|
|
return;
|
|
}
|
|
if(x.p_child_sn.value==x.pn_code.value){
|
|
alert("인트라넷 프로젝트 코드를 펀칭 프로젝트코드로 입력하실수 없습니다. 다시 확인하여 주시기 바랍니다");
|
|
return;
|
|
}
|
|
if(x.pn_code.value.indexOf(x.p_child_sn.value)==-1){
|
|
alert("펀칭 프로젝트코드는 [수행계획서 코드]+[추가코드]로 입력하여 주시기 바랍니다");
|
|
return;
|
|
}
|
|
if ((new RegExp(/[^a-z|^0-9|\_]/gi)).test(x.pn_code.value)) {
|
|
alert("펀칭 프로젝트코드는 [영/숫자],[_]만 사용하실수 있습니다 ");
|
|
return;
|
|
}
|
|
if(x.p_title.value==""){
|
|
alert("펀칭 프로젝트명을 입력하여 주세요");
|
|
return;
|
|
}
|
|
if(!confirm("펀칭 프로젝트를 등록하시겠습니까? 등록후에는 삭제하실수 없습니다 ")){return;}
|
|
|
|
x.p_insert.value="ok";
|
|
x.action="punching_index.asp";
|
|
x.submit();
|
|
}
|
|
|
|
// fcs 이관하기
|
|
function js_fcs_press(pn_cd){
|
|
var xxx="<%=Session("User_Number")%>";
|
|
if(xxx!="20190104"){
|
|
alert("해당메뉴 사용 권한이 없습니다 ");
|
|
return;
|
|
}
|
|
|
|
var url = "punching_fcs_insert.asp?pn_cd="+pn_cd;
|
|
var pwidth=1200;
|
|
var pheight=700;
|
|
var tleft=(screen.width-pwidth)/2;
|
|
var ttop=(screen.height-pheight)/2;
|
|
|
|
winObj=window.open(url, "wins", "left="+tleft+", top="+ttop+", menubar=no, location=no, status=no, toolbar=no, width="+pwidth+", height="+pheight+", scrollbars=yes ,resizable=no");
|
|
}
|
|
|
|
function fn_press(mo){
|
|
if(mo=="0"){
|
|
document.getElementById("searchTable2").style.display = "";
|
|
}
|
|
}
|
|
|
|
// 펀칭 사용자 등록
|
|
function js_punching_user(x){
|
|
var url = "punching_user.asp";
|
|
|
|
var pwidth=1700;
|
|
var pheight=900;
|
|
var tleft=(screen.width-pwidth)/2;
|
|
var ttop=(screen.height-pheight)/2;
|
|
|
|
winObj=window.open(url, "wins", "left="+tleft+", top="+ttop+", menubar=no, location=no, status=no, toolbar=no, width="+pwidth+", height="+pheight+", scrollbars=yes ,resizable=no");
|
|
}
|
|
|
|
function js_fcs_label(pn_cd){
|
|
var xxx="<%=Session("User_Number")%>";
|
|
if(xxx!="20171202"){
|
|
alert("해당메뉴 사용 권한이 없습니다 ");
|
|
return;
|
|
}
|
|
|
|
var url="punching_que_insert.asp?pn_cd="+pn_cd;
|
|
var pwidth=900;
|
|
var pheight=700;
|
|
var tleft=(screen.width-pwidth)/2;
|
|
var ttop=(screen.height-pheight)/2;
|
|
|
|
winObj=window.open(url, "wins", "left="+tleft+", top="+ttop+", menubar=no, location=no, status=no, toolbar=no, width="+pwidth+", height="+pheight+", scrollbars=yes ,resizable=no");
|
|
}
|
|
</script>
|
|
<%if create_ck<>"" then %>
|
|
<%
|
|
dim ck_msg
|
|
select case create_ck
|
|
case "dubble" : ck_msg="펀칭 프로젝트 코드가 중복 됩니다. 다시 등록하여 주세요 "
|
|
case "ok_code" : ck_msg="코드가 생성되었습니다 "
|
|
end select
|
|
%>
|
|
<script>
|
|
alert("<%=ck_msg%>");
|
|
</script>
|
|
<%end if %>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |