최초커밋
This commit is contained in:
954
statistics/dashboard_ctt.asp
Normal file
954
statistics/dashboard_ctt.asp
Normal file
@@ -0,0 +1,954 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<%
|
||||
|
||||
Function My_IsNumeric(value)
|
||||
My_IsNumeric = False
|
||||
If IsNull(value) Then Exit Function
|
||||
My_IsNumeric = IsNumeric(CStr(value))
|
||||
End Function
|
||||
|
||||
%>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
div.minimalistBlack {
|
||||
border: 2px solid #000000;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.divTable.minimalistBlack .divTableCell, .divTable.minimalistBlack .divTableHead {
|
||||
border: 1px solid #000000;
|
||||
padding: 5px 4px;
|
||||
}
|
||||
.divTable.minimalistBlack .divTableBody .divTableCell {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.divTableCell_intxt{
|
||||
text-align:right;
|
||||
}
|
||||
.divTableRow_subtotal{
|
||||
background-color: antiquewhite;
|
||||
}
|
||||
.divTableRow_total{
|
||||
background-color: #575757;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.divTable.minimalistBlack .divTableHeading {
|
||||
background: #CFCFCF;
|
||||
background: -moz-linear-gradient(top, #dbdbdb 0%, #d3d3d3 66%, #CFCFCF 100%);
|
||||
background: -webkit-linear-gradient(top, #dbdbdb 0%, #d3d3d3 66%, #CFCFCF 100%);
|
||||
background: linear-gradient(to bottom, #dbdbdb 0%, #d3d3d3 66%, #CFCFCF 100%);
|
||||
border-bottom: 3px solid #000000;
|
||||
}
|
||||
.divTable.minimalistBlack .divTableHeading .divTableHead {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
text-align: left;
|
||||
min-width: 100px;
|
||||
}
|
||||
.minimalistBlack .tableFootStyle {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
border-top: 3px solid #000000;
|
||||
}
|
||||
.minimalistBlack .tableFootStyle {
|
||||
font-size: 14px;
|
||||
}
|
||||
/* DivTable.com */
|
||||
.divTable{ display: table; }
|
||||
.divTableRow { display: table-row; }
|
||||
.divTableHeading { display: table-header-group;}
|
||||
.divTableCell, .divTableHead { display: table-cell;}
|
||||
.divTableHeading { display: table-header-group;}
|
||||
.divTableFoot { display: table-footer-group;}
|
||||
.divTableBody { display: table-row-group;}
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1>Dashboard</h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" >
|
||||
<%
|
||||
tmp_year = request("tmp_year")
|
||||
tmp_week = request("tmp_week")
|
||||
now_month = request("now_month")
|
||||
|
||||
if tmp_year = "" then
|
||||
tmp_year = year(date)
|
||||
end if
|
||||
|
||||
if( 2020 >= tmp_year )then
|
||||
tmp_year = year(date)
|
||||
end if
|
||||
if( tmp_year > 2022 )then
|
||||
tmp_year = year(date)
|
||||
end if
|
||||
|
||||
|
||||
'default
|
||||
query = " select yearnum, weeknum, sdate, edate, CONVERT(varchar(7), sdate, 120) AS now_month "
|
||||
query = query &" , CONVERT(varchar(7), dateadd(year,-1,sdate), 120) AS pre_month "
|
||||
query = query &" , CASE WHEN DATEPART(mm,sdate) < 4 THEN DATEPART(yy,sdate) - 1 ELSE DATEPART(yy,sdate) END diy_month "
|
||||
query = query &" FROM project2.dbo.BG_WEEKNUM with(nolock) "
|
||||
query = query &" WHERE del_yn = 'N' "
|
||||
query = query &" and yearnum = '"& tmp_year &"' "
|
||||
if tmp_week = "" then
|
||||
query = query &" AND CONVERT(VARCHAR(10), getdate(), 120) BETWEEN sdate AND edate "
|
||||
else
|
||||
query = query &" AND weeknum = '"& tmp_week &"' "
|
||||
end if
|
||||
|
||||
' response.write query
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
'adminView_hwkim(query)
|
||||
|
||||
' response.write "<br>----------query-------------"& query &"<br>"
|
||||
' response.write "<br>----------adors.RecordCount-------------"& adors.RecordCount &"<br>"
|
||||
' response.write "<br>----------yearnum-------------"& adors("yearnum") &"<br>"
|
||||
' response.write "<br>----------weeknum-------------"& adors("weeknum") &"<br>"
|
||||
' response.write "<br>----------diy_month-------------"& adors("diy_month") &"<br>"
|
||||
' response.write "<br>----------year(date)-------------"& year(date) &"-12-15"
|
||||
' response.write "<br>"
|
||||
|
||||
tmp_now_weeknum = adors("weeknum")
|
||||
tmp_sdate = adors("sdate")
|
||||
tmp_edate = adors("edate")
|
||||
tmp_now_month = adors("now_month")
|
||||
tmp_pre_month = adors("pre_month")
|
||||
tmp_diy_month = adors("diy_month")
|
||||
tmp_diy_month = tmp_diy_month &"-04"
|
||||
|
||||
adors.Close
|
||||
|
||||
if tmp_week = "" then
|
||||
tmp_week = tmp_now_weeknum
|
||||
end if
|
||||
|
||||
Dim arr_hd_sum()
|
||||
|
||||
Dim tmp_max_weeknum : tmp_max_weeknum = (tmp_now_weeknum + 2)
|
||||
if( tmp_max_weeknum > 54 )then
|
||||
tmp_max_weeknum = 54
|
||||
end if
|
||||
|
||||
' response.write " year = "& tmp_year
|
||||
' response.write " weeknum = "& tmp_week
|
||||
' response.write " tmp_sdate = "& tmp_sdate
|
||||
' response.write " tmp_edate = "& tmp_edate
|
||||
' response.write "<br>"
|
||||
|
||||
Dim arr(15,3), arrSUM(30,17), arrSUMTT(30)
|
||||
arr(0,0) = "BG_CODE" : arr(0,3) = "F": arr(0,1) = "Business Line" :arr(0,2) = "T"
|
||||
arr(1,0) = "GP" : arr(1,3) = "F": arr(1,1) = "Group #" :arr(1,2) = "T"
|
||||
arr(2,0) = "cro" : arr(2,3) = "I": arr(2,1) = "<22>̿<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ݾ<EFBFBD><br>(Carry-over)" :arr(2,2) = "I"
|
||||
arr(3,0) = "ctt_pre_ww" : arr(3,3) = "F": arr(3,1) = "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" :arr(3,2) = "I"
|
||||
arr(4,0) = "ctt" : arr(4,3) = "F": arr(4,1) = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>("& tmp_now_month &"<22><>)" :arr(4,2) = "I"
|
||||
arr(5,0) = "ctt_pre_mm" : arr(5,3) = "I": arr(5,1) = "<22>۳<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br>("& tmp_pre_month &"<22><>)" :arr(5,2) = "I"
|
||||
arr(6,0) = "mm_dif" : arr(6,3) = "F": arr(6,1) = "<22><> <20><><EFBFBD><EFBFBD>(%)" :arr(6,2) = "P"
|
||||
arr(7,0) = "ctt_add" : arr(7,3) = "F": arr(7,1) = "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>("& tmp_diy_month &"~"& tmp_now_month &")" :arr(7,2) = "I"
|
||||
arr(8,0) = "ctt_add_pre" : arr(8,3) = "I": arr(8,1) = "<22>۳<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(20.4~20.11)" :arr(8,2) = "I"
|
||||
arr(9,0) = "ctt_add_dif" : arr(9,3) = "F": arr(9,1) = "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" :arr(9,2) = "P"
|
||||
arr(10,0) = "sales_goal" : arr(10,3) = "I": arr(10,1) = "<22><><EFBFBD><EFBFBD> <20><>ǥ<br>21.04.01~22.03.31<br>(Carry over <20><><EFBFBD><EFBFBD>)" :arr(10,2) = "I"
|
||||
arr(11,0) = "sales_pre_amount" : arr(11,3) = "F": arr(11,1) = "<22><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" :arr(11,2) = "I"
|
||||
arr(12,0) = "sales_goal_per" : arr(12,3) = "F": arr(12,1) = "<22><><EFBFBD><EFBFBD> <20><>ǥ <br><3E><EFBFBD><DEBC><EFBFBD>" :arr(12,2) = "P"
|
||||
arr(13,0) = "sales_wip" : arr(13,3) = "I": arr(13,1) = "20<32><30> WIP<br><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" :arr(13,2) = "I"
|
||||
arr(14,0) = "sales_year_dif" : arr(14,3) = "F": arr(14,1) = "<22><><EFBFBD><EFBFBD> Vs.<2E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD>" :arr(14,2) = "P"
|
||||
|
||||
' <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Dim arrvalW(15,3), arrvalM(15,3), arrvalC(15,3)
|
||||
|
||||
'//-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT p_depart_dep "&VbCrlf
|
||||
query = query & " , sum(p_total_cost) total_cost "&VbCrlf
|
||||
query = query & " FROM T_PROJECT_BASE tpb "&VbCrlf
|
||||
query = query & " WHERE 1 = 1 and p_state = 'P' AND CONVERT(varchar(10), p_decide_date, 120) BETWEEN '"& tmp_sdate &"'AND '"& tmp_edate &"' "&VbCrlf '//-- p_state = 'P' <20><><EFBFBD><EFBFBD>
|
||||
query = query & " GROUP BY p_depart_dep "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
'adminView_hwkim("<br>1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br>")
|
||||
'adminView_hwkim(query)
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
For i = 1 To adors.RecordCount
|
||||
arrvalW(i,0) = adors("p_depart_dep")
|
||||
arrvalW(i,1) = adors("total_cost")
|
||||
'response.write "//"& adors("p_depart_dep") & arrvalW(i,0) & arrvalW(i,1)
|
||||
adors.MoveNext
|
||||
Next
|
||||
end if
|
||||
adors.Close
|
||||
'//-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT p_depart_dep "&VbCrlf
|
||||
query = query & " , sum(p_total_cost) total_cost "&VbCrlf
|
||||
query = query & " FROM T_PROJECT_BASE tpb "&VbCrlf
|
||||
query = query & " WHERE 1 = 1 and p_state = 'P' AND CONVERT(varchar(7), p_decide_date, 120) = '"& tmp_now_month &"' "&VbCrlf '//-- p_state = 'P' <20><><EFBFBD><EFBFBD>
|
||||
query = query & " GROUP BY p_depart_dep "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
'adminView_hwkim("<br>2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br>")
|
||||
'adminView_hwkim(query)
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
For i = 1 To adors.RecordCount
|
||||
arrvalM(i,0) = adors("p_depart_dep")
|
||||
arrvalM(i,1) = adors("total_cost")
|
||||
'response.write "//"& adors("p_depart_dep") & arrvalM(i,0) & arrvalM(i,1)
|
||||
adors.MoveNext
|
||||
Next
|
||||
end if
|
||||
adors.Close
|
||||
'//-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT p_depart_dep "&VbCrlf
|
||||
query = query & " , sum(p_total_cost) total_cost "&VbCrlf
|
||||
query = query & " FROM T_PROJECT_BASE tpb "&VbCrlf
|
||||
query = query & " WHERE 1 = 1 and p_state = 'P' AND CONVERT(varchar(7), p_decide_date, 120) BETWEEN '"& tmp_diy_month &"'AND '"& tmp_now_month &"' "&VbCrlf '//-- p_state = 'P' <20><><EFBFBD><EFBFBD>
|
||||
query = query & " GROUP BY p_depart_dep "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
'adminView_hwkim("<br>3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>")
|
||||
'adminView_hwkim(query)
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
For i = 1 To adors.RecordCount
|
||||
arrvalC(i,0) = adors("p_depart_dep")
|
||||
arrvalC(i,1) = adors("total_cost")
|
||||
'response.write "//"& adors("p_depart_dep") & arrvalC(i,0) & arrvalC(i,1)
|
||||
adors.MoveNext
|
||||
Next
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
<!-- < !-- #include virtual = "statistics/inc_team_project_ctt.asp" -- > -->
|
||||
|
||||
<!-- #include virtual = "statistics/inc_team_project_next.asp" -->
|
||||
<tr>
|
||||
<td>
|
||||
<form name='team_project_count' method='post' >
|
||||
<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
|
||||
<tr>
|
||||
<td bgcolor="#DFDFDF" class='p-1 pl-2'>
|
||||
<09><><EFBFBD>ϳ
|
||||
<%
|
||||
NowYear = year(date())
|
||||
%>
|
||||
<select name="tmp_year" id="tmp_year" style="width: 100px;">
|
||||
<%For i = NowYear To 2021 Step - 1 %>
|
||||
<OPTION value='<%=i%>' <%if cint(i) = cint(tmp_year) then%> selected <%end if%>><%=i%></OPTION>
|
||||
<%next%>
|
||||
</SELECT>
|
||||
<select name="tmp_week" id="tmp_week" style="width: 120px;">
|
||||
<option value="" > </option>
|
||||
</SELECT>
|
||||
<!-- <select name="tmp_week" id="tmp_week" style="width: 120px;">
|
||||
<%for i= 1 to 54 step 1 %>
|
||||
<OPTION value='<%=i%>' <%if cint(i) = cint(tmp_week) then%> selected <%end if%>><%=i%> weeknum</OPTION>
|
||||
<%next%>
|
||||
</SELECT> -->
|
||||
|
||||
|
||||
(<%=tmp_sdate %> ~ <%=tmp_edate %> )
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="goView();"><3E><> <20><></button>
|
||||
<!--
|
||||
|
||||
<input type="button" name="" value="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD>" onclick="javascript:pageMove();"/>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- //-- CTT -->
|
||||
<!-- 2021-11-17 -->
|
||||
<%
|
||||
query = " SELECT bc.idx as bc_idx "&vbCrLf
|
||||
query = query & " , bc.BG_CODE "&vbCrLf
|
||||
query = query & " , bc.BL "&vbCrLf
|
||||
query = query & " , bc.GP "&vbCrLf
|
||||
query = query & " , bc.team_cd "&vbCrLf
|
||||
query = query & " , bc.subtotal_key "&vbCrLf
|
||||
query = query & " , (CASE WHEN isnull(bwd.idx,'0') = 0 THEN 'insert' ELSE 'update' END) input_yn "&vbCrLf
|
||||
query = query & " , bwd.idx as bwd_idx "&vbCrLf
|
||||
query = query & " , isnull(bwd.yearnum,'"& tmp_year &"') yearnum "&vbCrLf
|
||||
query = query & " , isnull(bwd.weeknum,'"& tmp_week &"') weeknum "&vbCrLf
|
||||
query = query & " , bwd.cro "&vbCrLf
|
||||
query = query & " , bwd.ctt_pre_ww "&vbCrLf
|
||||
query = query & " , bwd.ctt "&vbCrLf
|
||||
query = query & " , bwd.ctt_pre_mm "&vbCrLf
|
||||
query = query & " , bwd.mm_dif "&vbCrLf
|
||||
query = query & " , bwd.ctt_add "&vbCrLf
|
||||
query = query & " , bwd.ctt_add_pre "&vbCrLf
|
||||
query = query & " , bwd.ctt_add_dif "&vbCrLf
|
||||
query = query & " , bwd.sales_goal "&vbCrLf
|
||||
query = query & " , bwd.sales_pre_amount "&vbCrLf
|
||||
query = query & " , bwd.sales_goal_per "&vbCrLf
|
||||
query = query & " , bwd.sales_wip "&vbCrLf
|
||||
query = query & " , bwd.sales_year_dif "&vbCrLf
|
||||
query = query & " FROM BG_CATEGORY bc "&vbCrLf
|
||||
query = query & " LEFT OUTER JOIN BG_WEEKNUM_DATA bwd "&vbCrLf
|
||||
query = query & " ON bc.BG_CODE = bwd.BG_CODE "&vbCrLf
|
||||
query = query & " AND bwd.del_yn = 'N' "&vbCrLf
|
||||
query = query & " AND bwd.yearnum = '"& tmp_year &"' "&vbCrLf
|
||||
query = query & " AND bwd.weeknum = '"& tmp_week &"' "&vbCrLf
|
||||
query = query & "WHERE bc.del_yn = 'N' "&vbCrLf
|
||||
query = query & "ORDER BY bc.sortnum ASC "
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
'response.write "<br>----------query-------------<br><br>"& query &" <br><br>"
|
||||
'response.write "<br>----------adors.RecordCount-------------"& adors.RecordCount &"///"
|
||||
'response.write "<br>-----------------------"& adors("yearnum") &"///"
|
||||
'response.write "<br>-----------------------"& adors("weeknum") &"///"
|
||||
'response.write "<br>-----------------------"& year(date) &"-12-15"
|
||||
|
||||
'response.write "<br>"
|
||||
|
||||
tmp_now_weeknum = adors("weeknum")
|
||||
|
||||
'//-- adors.Close
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="cttForm" name="cttForm" method="post">
|
||||
<div class="SaveWarp my-1">
|
||||
<%
|
||||
'response.write "<br>-----------------------"& Request.ServerVariables("REMOTE_ADDR")
|
||||
'response.write "<br>-----------------------"& session("admin_ip")
|
||||
if( session("admin_ip") <> "" or ( session("User_Number") = "20190301" or session("User_Number") = "20191202" ) )then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
'response.write "<br>-----------------------"& session("admin_ip") &"---------" %>
|
||||
<div class="SaveContainer" style="width: 1000px;">
|
||||
<button type='button' class="ui-button ui-widget ui-corner-all" name="cls_view" id="cls_view"><3E>Է<EFBFBD><D4B7>ϱ<EFBFBD></button>
|
||||
|
||||
<button type='button' class="ui-button ui-widget ui-corner-all" name="ContactTran" id="ContactTran" style="display:none;">(<28>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>갪<EFBFBD><EAB0AA> <20>ڽ<EFBFBD><DABD><EFBFBD> <20>Է<EFBFBD>)</button>
|
||||
|
||||
<button type='button' class="ui-button ui-widget ui-corner-all" name="ContactSave" id="ContactSave" style="display:none;"><3E><><EFBFBD><EFBFBD></button>
|
||||
|
||||
<span class="cls_val_yn" style="display:none;color: red;font-weight: bold;" >* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>赥<EFBFBD><E8B5A5><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. ȭ<>鿡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> input <20>ڽ<EFBFBD><DABD><EFBFBD> <20>Է<EFBFBD> <20><> "<22><><EFBFBD><EFBFBD>"<22>Ͻʽÿ<CABD>.</span>
|
||||
</div>
|
||||
<% end if %>
|
||||
</div>
|
||||
<div class="divTable minimalistBlack mb-2">
|
||||
<div class="divTableHeading" >
|
||||
<div class="divTableRow" >
|
||||
<% for i = 1 to 14 step 1 %>
|
||||
<div class="divTableHead" alt="<%=i %>.<%=arr(i,0) %>" ><%=arr(i,3) %>.<%=arr(i,1) %></div>
|
||||
<% next %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divTableBody" >
|
||||
<%
|
||||
for ii = 1 to adors.RecordCount
|
||||
|
||||
'response.write "-----------------"& InStr(adors("GP"), "Subtotal")
|
||||
if( InStr(adors("GP"), "Subtotal") > 0 )then
|
||||
div_list_bgcolor = "divTableRow_subtotal"
|
||||
Else
|
||||
div_list_bgcolor = ""
|
||||
End If
|
||||
|
||||
if( adors("GP") = "Total" )then
|
||||
div_list_bgcolor = "divTableRow_total"
|
||||
end if
|
||||
%>
|
||||
<div class="divTableRow <%=div_list_bgcolor%> " >
|
||||
<%'=adors("team_cd") %>
|
||||
|
||||
<div class="divTableCell" style="display:none;" ><%=ii %>
|
||||
<input type="text" name="input_yn" value="<%=adors("input_yn") %>" >
|
||||
<input type="text" name="yearnum" value="<%=adors("yearnum") %>" >
|
||||
<input type="text" name="weeknum" value="<%=adors("weeknum") %>" >
|
||||
<input type="text" name="bwd_idx" value="<%=adors("bwd_idx") %>" >
|
||||
</div>
|
||||
|
||||
<% for i = 0 to 14 step 1
|
||||
|
||||
tmp_div_type = ""
|
||||
tmp_input_type = "text"
|
||||
'if( arr(i,0) = "BG_CODE" or arr(i,0) = "GP" )then
|
||||
' tmp_input_type = "hidden"
|
||||
'end if
|
||||
view_val_acc = ""
|
||||
view_val = adors(arr(i,0))
|
||||
|
||||
'//-----------------------------------------------------
|
||||
'//-- cols
|
||||
select case i
|
||||
case "0":
|
||||
tmp_div_type = "none"
|
||||
tmp_input_type = "hidden"
|
||||
select case adors(arr(i,0)):
|
||||
case "BG00001","BG00002","BG00003","BG00004","BG00005","BG00006","BG00007","BG00008","BG00009": view_val = "Research&Consulting"
|
||||
case "BG00010","BG00011","BG00012","BG00013","BG00014": view_val = "Data Innovation"
|
||||
case "BG00015","BG00016","BG00017": view_val = "Digital Convergence"
|
||||
case else: view_val = "Total"
|
||||
end select
|
||||
case "1":
|
||||
tmp_input_type = "hidden"
|
||||
view_val = adors(arr(i,0))
|
||||
case else:
|
||||
view_val = adors(arr(i,0))
|
||||
'//-- <20><><EFBFBD><EFBFBD> 'arrSUM(30,17)
|
||||
'//arrSUM(ii,i) = adors(arr(i,0))
|
||||
arrSUMTT(ii) = adors("subtotal_key") '//-- subtotal Ȯ<><C8AE>Ű 'response.write arrSUM(ii,i) 'response.write "///"& adors("subtotal_key")
|
||||
if( left(adors("subtotal_key"),2) <> "st" and adors("subtotal_key") <> "tt" )then
|
||||
arrSUM(ii,i) = adors(arr(i,0))
|
||||
end if
|
||||
end select
|
||||
'//-----------------------------------------------------
|
||||
|
||||
'/////view_val = 0
|
||||
|
||||
'ctt_pre_ww" ' <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if( arr(i,0) = "ctt_pre_ww" )then
|
||||
for aw = 0 to Ubound(arrvalW)
|
||||
'response.write aw&" - "& arrvalW(aw,0)
|
||||
'response.write "--- "& adors("team_cd") &" - "& arrvalW(aw,0) &" - "& arrvalW(aw,1)
|
||||
if( trim(adors("team_cd")) = trim(arrvalW(aw,0)) )then
|
||||
'response.write "***--- "& adors("team_cd") &" - "& arrvalW(aw,0) &" - "& arrvalW(aw,1)
|
||||
view_val_acc = arrvalW(aw,1)
|
||||
end if
|
||||
next
|
||||
'response.write "--- "& adors("team_cd")
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("ctt_pre_ww")
|
||||
'response.write "--- "& adors("ctt_pre_mm")
|
||||
end if
|
||||
'//-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ctt
|
||||
if( arr(i,0) = "ctt" )then
|
||||
for aw = 0 to Ubound(arrvalM)
|
||||
'response.write aw&" - "& arrvalM(aw,0)
|
||||
'response.write "--- "& adors("team_cd") &" - "& arrvalM(aw,0) &" - "& arrvalM(aw,1)
|
||||
if( trim(adors("team_cd")) = trim(arrvalM(aw,0)) )then
|
||||
'response.write "***--- "& adors("team_cd") &" - "& arrvalM(aw,0) &" - "& arrvalM(aw,1)
|
||||
view_val_acc = arrvalM(aw,1)
|
||||
end if
|
||||
next
|
||||
'response.write "--- "& adors("team_cd")
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("ctt")
|
||||
'response.write "--- "& adors("ctt_pre_mm")
|
||||
end if
|
||||
|
||||
'//-- <20><> <20><><EFBFBD><EFBFBD>(%)
|
||||
'//-- ctt/ctt_pre_mm*100
|
||||
if( arr(i,0) = "mm_dif" )then
|
||||
if( adors("ctt_pre_mm") > 0 )then
|
||||
view_val = adors("ctt") / adors("ctt_pre_mm")
|
||||
else
|
||||
view_val = 0
|
||||
end if
|
||||
if( view_val > 0 )then
|
||||
view_val = view_val * 100
|
||||
end if
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("ctt")
|
||||
'response.write "--- "& adors("ctt_pre_mm")
|
||||
end if
|
||||
|
||||
'//-- .<2E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> arrvalC
|
||||
if( arr(i,0) = "ctt_add" )then
|
||||
for aw = 0 to Ubound(arrvalC)
|
||||
'response.write aw&" - "& arrvalC(aw,0)
|
||||
'response.write "--- "& adors("team_cd") &" - "& arrvalC(aw,0) &" - "& arrvalC(aw,1)
|
||||
if( trim(adors("team_cd")) = trim(arrvalC(aw,0)) )then
|
||||
'response.write "***--- "& adors("team_cd") &" - "& arrvalC(aw,0) &" - "& arrvalC(aw,1)
|
||||
view_val_acc = arrvalC(aw,1)
|
||||
end if
|
||||
next
|
||||
'response.write "--- "& adors("team_cd")
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("ctt")
|
||||
'response.write "--- "& adors("ctt_pre_mm")
|
||||
end if
|
||||
|
||||
'//-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
'//-- ctt_add/ctt_add_pre*100
|
||||
if( arr(i,0) = "ctt_add_dif" )then
|
||||
if( adors("ctt_add_pre") > 0 )then
|
||||
view_val = adors("ctt_add") / adors("ctt_add_pre")
|
||||
else
|
||||
view_val = 0
|
||||
end if
|
||||
if( view_val > 0 )then
|
||||
view_val = view_val * 100
|
||||
end if
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("ctt_add")
|
||||
'response.write "--- "& adors("ctt_add_pre")
|
||||
end if
|
||||
'//-- <20><><EFBFBD><EFBFBD> <20><>ǥ <20><EFBFBD><DEBC><EFBFBD>
|
||||
'//-- sales_goal/sales_pre_amount*100
|
||||
if( arr(i,0) = "sales_goal_per" )then
|
||||
if( adors("sales_pre_amount") > 0 )then
|
||||
view_val = adors("sales_goal") / adors("sales_pre_amount")
|
||||
else
|
||||
view_val = 0
|
||||
end if
|
||||
if( view_val > 0 )then
|
||||
view_val = view_val * 100
|
||||
end if
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("sales_goal")
|
||||
'response.write "--- "& adors("sales_pre_amount")
|
||||
end if
|
||||
'//-- <20><><EFBFBD><EFBFBD> Vs.<2E><><EFBFBD><EFBFBD>
|
||||
'//-- sales_goal/sales_wip*100
|
||||
if( arr(i,0) = "sales_year_dif" )then
|
||||
if( adors("sales_wip") > 0 )then
|
||||
view_val = adors("sales_goal") / adors("sales_wip")
|
||||
else
|
||||
view_val = 0
|
||||
end if
|
||||
if( view_val > 0 )then
|
||||
view_val = view_val * 100
|
||||
end if
|
||||
'response.write "--- "& arr(i,0)
|
||||
'response.write "--- "& adors("sales_goal")
|
||||
'response.write "--- "& adors("sales_wip")
|
||||
end if
|
||||
|
||||
'//-----------------------------------------------------
|
||||
'//-- subtotal, total
|
||||
select case i
|
||||
case "0":
|
||||
case "1":
|
||||
case else:
|
||||
if( arr(i,2) = "P" )then '--per<65><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
view_val_acc = arr(i,2)
|
||||
else
|
||||
'//-- subtotal
|
||||
if( left(adors("subtotal_key"),2) = "st" )then
|
||||
subtotal_sum = 0
|
||||
subtotal_gb = right(adors("subtotal_key"),1)
|
||||
|
||||
for is_acc = 0 to ii
|
||||
if( subtotal_gb = arrSUMTT(is_acc) )then
|
||||
'response.write "<br>** "& subtotal_gb &" - "& arrSUMTT(is_acc) &" "& arrSUM(is_acc,i) &" **"
|
||||
subtotal_sum = subtotal_sum + arrSUM(is_acc,i)
|
||||
end if
|
||||
next
|
||||
|
||||
arrSUM(ii,i) = subtotal_sum
|
||||
view_val_acc = subtotal_sum
|
||||
end if
|
||||
'//-- total
|
||||
if( adors("subtotal_key") = "tt" )then
|
||||
subtotal_sum = 0
|
||||
|
||||
for is_acc = 0 to ii
|
||||
if( left(arrSUMTT(is_acc),2) <> "st" and arrSUMTT(is_acc) <> "tt" )then
|
||||
'response.write "<br>** "& left(arrSUMTT(is_acc),2) &" - "& arrSUMTT(is_acc) &" "& arrSUM(is_acc,i) &" **"
|
||||
subtotal_sum = subtotal_sum + arrSUM(is_acc,i)
|
||||
end if
|
||||
next
|
||||
|
||||
arrSUM(ii,i) = subtotal_sum
|
||||
view_val_acc = subtotal_sum
|
||||
end if
|
||||
end if
|
||||
|
||||
end select
|
||||
'//-----------------------------------------------------
|
||||
|
||||
'Response.Write "IsNull(view_val_acc) : //"& view_val_acc &"// " & IsNull(view_val_acc) & "<br>"
|
||||
'Response.Write "IsEmpty(view_val_acc) : " & IsEmpty(view_val_acc) & "<br>"
|
||||
'Response.Write "len(view_val_acc) : " & len(view_val_acc) & "<br>"
|
||||
'Response.Write "My_IsNumeric(view_val_acc) : " & My_IsNumeric(view_val_acc) & "<br>"
|
||||
|
||||
if( len(view_val_acc) > 0 and My_IsNumeric(view_val_acc) = True )then
|
||||
view_val_acc = formatNumber(view_val_acc,0)
|
||||
end if
|
||||
'response.write "*"& view_val_acc
|
||||
|
||||
|
||||
|
||||
'Response.Write "IsNull(view_val) : //"& view_val &"// " & IsNull(view_val) & "<br>"
|
||||
'Response.Write "IsEmpty(view_val) : " & IsEmpty(view_val) & "<br>"
|
||||
|
||||
if( arr(i,2) = "I" and IsNull(view_val) = False )then
|
||||
'view_val = formatNumber(view_val,6)
|
||||
view_val = formatNumber(view_val,0)
|
||||
end if
|
||||
if( arr(i,2) = "P" and IsNull(view_val) = False )then
|
||||
'view_val = formatNumber(view_val,6) &" %"
|
||||
'view_val = formatNumber(view_val,2) &" %"
|
||||
view_val = formatNumber(view_val,0) &" %"
|
||||
end if
|
||||
|
||||
'//-- <20><><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD> <20>ƴ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> hidden
|
||||
'if( arr(i,3) = "F" )then
|
||||
' tmp_input_type = "hidden"
|
||||
'end if
|
||||
'//-- % <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> hidden
|
||||
if( arr(i,2) = "P" )then
|
||||
tmp_input_type = "hidden"
|
||||
end if
|
||||
%>
|
||||
<div class="divTableCell divTableCell_intxt row_<%=ii %> <%=arr(i,0) %>" style="display:<%=tmp_div_type %>" >
|
||||
<span class="cls_val_yn cls_val_real" style="display:none;color: red;font-weight: bold;" ><%=view_val_acc %><br></span>
|
||||
<%'=arrSUM(ii,i) &"<br>"%>
|
||||
<%=view_val %>
|
||||
<input type="<%=tmp_input_type %>" class="cls_val_yn cls_val_real_input" name="<%=arr(i,0) %>" value="<%=adors(arr(i,0)) %>" style="display:none;" >
|
||||
</div>
|
||||
<% next %>
|
||||
|
||||
</div>
|
||||
<%
|
||||
adors.MoveNext
|
||||
next
|
||||
|
||||
'//-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> Ȯ<>ο<EFBFBD>
|
||||
''response.write "<table class='cls_val_yn' style='display:none;' >"
|
||||
''for ii =0 to 30
|
||||
'' for i = 0 to 17
|
||||
'' response.write "<td>"& arrSUMTT(ii) &" "& arrSUM(ii,i) &" </td>"
|
||||
'' next
|
||||
'' response.write "</tr><tr>"
|
||||
''next
|
||||
''
|
||||
''response.write "</table>"
|
||||
%>
|
||||
</div>
|
||||
<div class="divTableFoot tableFootStyle" style="display:none;" >
|
||||
<div class="divTableRow" >
|
||||
<div class="divTableCell"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>Ʈ</div>
|
||||
<div class="divTableCell"> - </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<%
|
||||
adors.Close
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:15 0 0 0"><hr></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="width:100%;" >
|
||||
<tr>
|
||||
<td class="cls_att_yn" style="padding:5 0 0 0; display:;font-size:;vertical-align: top;width: 780px;">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td style="padding:15 0 0 0" colspan=4><font class="brown" size="3"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>Ʈ ( <%=tmp_sdate %> ~ <%=tmp_edate %> )</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10%" align="center"><3E>μ<EFBFBD></td>
|
||||
<td width="10%" align="center" ><3E><>¥</td>
|
||||
<td width="65%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="15%" align="center"><3E>ݾ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, p_subject "&VbCrlf
|
||||
query = query & " , p_total_cost , p_cont_cost "&VbCrlf
|
||||
query = query & " , CONVERT(varchar(10), p_input_dt, 120) p_input_dt "&VbCrlf
|
||||
query = query & " , CONVERT(varchar(10), p_decide_date, 120) p_decide_date "&VbCrlf
|
||||
query = query & " FROM T_PROJECT_BASE tpb "&VbCrlf
|
||||
query = query & " LEFT OUTER JOIN (SELECT team_cd, team_name, id AS tg_idx FROM TEAM_GROUP TG WHERE TG.div_use = '1' ) TG "&VbCrlf
|
||||
query = query & " ON p_depart_dep = team_cd "&VbCrlf
|
||||
'query = query & " WHERE 1 = 1 and p_state = 'P' AND CONVERT(varchar(10), p_input_dt, 120) BETWEEN '"& tmp_sdate &"'AND '"& tmp_edate &"' "&VbCrlf
|
||||
query = query & " WHERE 1 = 1 and p_state = 'P' AND CONVERT(varchar(10), p_decide_date, 120) BETWEEN '"& tmp_sdate &"'AND '"& tmp_edate &"' "&VbCrlf
|
||||
query = query & " ORDER BY TG.tg_idx asc "
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
if adors.RecordCount > 0 then
|
||||
|
||||
sum_cont_cost = 0
|
||||
|
||||
For i = 1 To adors.RecordCount
|
||||
%>
|
||||
<tr>
|
||||
<td width="10%" class="tahoma" align="center"><%=adors("team_name") %></td>
|
||||
<td width="10%" class="tahoma" align="center"><%=adors("p_decide_date") %></td>
|
||||
<td width="65%" class="tahoma" align="left" ><%=adors("p_subject") %> </td>
|
||||
<td width="15%" class="tahoma" align="right"><%=formatnumber(adors("p_total_cost"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_total_cost"))
|
||||
|
||||
adors.MoveNext
|
||||
Next
|
||||
%>
|
||||
<tr bgcolor="#F7F2E0" style="border-top:1px solid gray;">
|
||||
<td width="13%" class="tahoma" align="center" style="font-weight:bold;"><3E><> <20><></td>
|
||||
<td width="13%" class="tahoma" align="center" style="font-weight:bold;"><3E><> <20><></td>
|
||||
<td width="13%" class="tahoma" align="right" style="font-weight:bold;"></td>
|
||||
<td width="13%" class="tahoma" align="right" style="font-weight:bold;"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
else
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><3E><>ȸ<EFBFBD><C8B8> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
<td class="cls_att_yn" > </td>
|
||||
<td class="cls_att_yn" style="padding:5 0 0 0; display:;vertical-align: top;width: 780px;">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td style="padding:15 0 0 0" colspan=4><font class="brown" size="3"><3E><><EFBFBD>డ<EFBFBD><E0B0A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>Ʈ </font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10%" align="center"><3E>μ<EFBFBD></td>
|
||||
<td width="10%" align="center" ><3E><>¥</td>
|
||||
<td width="65%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="15%" align="center"><3E><><EFBFBD>ȱݾ<C8B1></td>
|
||||
</tr>
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, p_subject "&VbCrlf
|
||||
query = query & " , p_total_cost , p_cont_cost "&VbCrlf
|
||||
query = query & " , CONVERT(varchar(10), p_input_dt, 120) p_input_dt "&VbCrlf
|
||||
query = query & " , CONVERT(varchar(10), p_decide_date, 120) p_decide_date "&VbCrlf
|
||||
query = query & " FROM T_PROJECT_BASE tpb "&VbCrlf
|
||||
query = query & " LEFT OUTER JOIN (SELECT team_cd, team_name, id AS tg_idx FROM TEAM_GROUP TG WHERE TG.div_use = '1' ) TG "&VbCrlf
|
||||
query = query & " ON p_depart_dep = team_cd "&VbCrlf
|
||||
query = query & " WHERE 1 = 1 "&VbCrlf
|
||||
'query = query & " and p_state = 'P' "&VbCrlf '<27><><EFBFBD><EFBFBD>
|
||||
query = query & " and p_state = 'K' "&VbCrlf '<27><><EFBFBD><EFBFBD>
|
||||
'query = query & " AND CONVERT(varchar(10), p_input_dt, 120) >= '2021-01-01' "&VbCrlf
|
||||
''query = query & " AND CONVERT(varchar(10), p_input_dt, 120) BETWEEN '"& tmp_sdate &"'AND '"& tmp_edate &"' "&VbCrlf
|
||||
query = query & " ORDER BY TG.tg_idx asc "
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
if adors.RecordCount > 0 then
|
||||
|
||||
sum_cont_cost = 0
|
||||
|
||||
For i = 1 To adors.RecordCount
|
||||
%>
|
||||
<tr>
|
||||
<td width="10%" class="tahoma" align="center"><%=adors("team_name") %></td>
|
||||
<td width="10%" class="tahoma" align="center"><%=adors("p_input_dt") %></td>
|
||||
<td width="65%" class="tahoma" align="left" ><%=adors("p_subject") %> </td>
|
||||
<td width="15%" class="tahoma" align="right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
|
||||
adors.MoveNext
|
||||
Next
|
||||
%>
|
||||
<tr bgcolor="#F7F2E0" style="border-top:1px solid gray;">
|
||||
<td width="13%" class="tahoma" align="center" style="font-weight:bold;"><3E><> <20><></td>
|
||||
<td width="13%" class="tahoma" align="center" style="font-weight:bold;"><3E><> <20><></td>
|
||||
<td width="13%" class="tahoma" align="right" style="font-weight:bold;"></td>
|
||||
<td width="13%" class="tahoma" align="right" style="font-weight:bold;"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
else
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><3E><>ȸ<EFBFBD><C8B8> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- //-- CTT -->
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function goView() {
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
var tmp_week = document.team_project_count.tmp_week.value;
|
||||
|
||||
var url = "";
|
||||
url = "./dashboard_ctt.asp?tmp_year=" + tmp_year + "&tmp_week=" + tmp_week;
|
||||
|
||||
//eval("document.all.menuf.src = url;");
|
||||
//alert(url);
|
||||
document.team_project_count.action = url;
|
||||
document.team_project_count.submit();
|
||||
}
|
||||
|
||||
function getWeeknum(){
|
||||
|
||||
var params = {
|
||||
tmp_year : $("#tmp_year").val()
|
||||
}
|
||||
console.log(params);
|
||||
|
||||
$.ajax({
|
||||
url:"dashboard_ctt_cate_Ajax.asp",
|
||||
method:"POST",
|
||||
data:params,
|
||||
contentType:"application/x-www-form-urlencoded; charset=euc-kr",
|
||||
dataType: "JSON",
|
||||
async:false,
|
||||
success:function(res){
|
||||
//console.log("y");
|
||||
$("#tmp_week").empty();
|
||||
//console.log(res.data);
|
||||
$.each(res.data, function (index, value) {
|
||||
$('#tmp_week').append('<option value="' + value.weeknum + '">' + value.weeknum + ' weeknum : '+ value.sdate +'~'+ value.edate +'</option>');
|
||||
});
|
||||
|
||||
$("#tmp_week").val("<%=tmp_now_weeknum %>").prop("selected", true);
|
||||
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//-- <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> input<75><74> <20>Է<EFBFBD>
|
||||
function readyValtoInput(){
|
||||
|
||||
$.each( $(".cls_val_real"), function(index, item){
|
||||
|
||||
var real_acc_val = $(".cls_val_real:eq("+index+")").text();
|
||||
real_acc_val = real_acc_val.replace(/,/g, "");
|
||||
|
||||
//console.log(index +' - '+ item );
|
||||
if( $(".cls_val_real_input:eq("+index+")").attr("type") != "hidden" ){
|
||||
//$(".cls_val_real_input:eq("+index+")").val($(".cls_val_real:eq("+index+")").text());
|
||||
$(".cls_val_real_input:eq("+index+")").val(real_acc_val);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#cls_view").on("click", function(){
|
||||
$(".cls_val_yn").toggle();
|
||||
$("#ContactTran").toggle();
|
||||
$("#ContactSave").toggle();
|
||||
});
|
||||
|
||||
$("#cls_att_view").on("click", function(){
|
||||
$(".cls_att_yn").toggle();
|
||||
});
|
||||
|
||||
|
||||
//-- top combo select - dashboard_ctt_cate_Ajax.asp
|
||||
getWeeknum();
|
||||
|
||||
$("#tmp_year").on("change", function(){
|
||||
getWeeknum();
|
||||
});
|
||||
$("#tmp_week").on("change", function(){
|
||||
goView();
|
||||
});
|
||||
|
||||
$("#ContactTran").on("click", function(){
|
||||
readyValtoInput();
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
$("#ContactSave").on("click", function(){
|
||||
if(confirm("<22>Է»<D4B7><C2BB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
var params = jQuery("#cttForm").serialize(); // serialize() : <20>Էµ<D4B7> <20><><EFBFBD><EFBFBD>Element(<28><>)<29><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> serialize <20>Ѵ<EFBFBD>.
|
||||
//var params = jQuery("#cttForm").serializeArray();
|
||||
console.log(params);
|
||||
|
||||
$.ajax({
|
||||
url:"dashboard_ctt_AjaxSave.asp",
|
||||
method:"POST",
|
||||
data:params,
|
||||
contentType:"application/x-www-form-urlencoded; charset=euc-kr",
|
||||
async:false,
|
||||
success:function(res){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>");
|
||||
location.href="./dashboard_ctt.asp?tmp_year=<%=tmp_year %>&tmp_week=<%=tmp_week %>";
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
/*
|
||||
$.ajax({
|
||||
url:"dashboard_ctt_AjaxSave.asp",
|
||||
method:"POST",
|
||||
data:params,
|
||||
contentType:"application/x-www-form-urlencoded; charset=euc-kr",
|
||||
async:false,
|
||||
success:function(res){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>");
|
||||
//location.href="./dashboard_ctt.asp?tmp_year=<%=tmp_year %>&tmp_week=<%=tmp_week %>";
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
});
|
||||
function detailView(depart){
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
var tmp_month = "0";
|
||||
var p_depart = depart;
|
||||
|
||||
var url = "team_project_popup.asp?tmp_year=" + tmp_year + "&tmp_month=" + tmp_month + "&p_depart="+p_depart;
|
||||
url = url + "&command=popup";
|
||||
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=950, height=650 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
|
||||
function pageMove() {
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
//var tmp_month = document.team_project_count.tmp_month.value;
|
||||
//var p_depart = document.team_project_count.p_depart.value;
|
||||
|
||||
var url = "team_project_count.asp?tmp_year=&tmp_month=&p_depart=";
|
||||
//alert(url);
|
||||
document.team_project_count.action = url;
|
||||
document.team_project_count.submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
76
statistics/dashboard_ctt_AjaxSave.asp
Normal file
76
statistics/dashboard_ctt_AjaxSave.asp
Normal file
@@ -0,0 +1,76 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
Response.CharSet="euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.AddHeader "cache-control", "no-staff"
|
||||
Response.Expires = -1
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
|
||||
input_yn = request("input_yn")'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD>
|
||||
|
||||
dim sql : sql = ""
|
||||
|
||||
response.write " input_yn = "& input_yn &"<br>"
|
||||
|
||||
If request("input_yn") <> "" then
|
||||
For i = 1 To request("input_yn").count
|
||||
|
||||
input_yn = request("input_yn")(i)
|
||||
yearnum = request("yearnum")(i)
|
||||
weeknumb = request("weeknum")(i)
|
||||
bwd_idx = request("bwd_idx")(i)
|
||||
|
||||
BG_CODE = request("BG_CODE")(i) 'Business Line
|
||||
GP = request("GP")(i) 'Group #
|
||||
cro = request("cro")(i) '<27>̿<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ݾ<EFBFBD><br>(Carry-over)
|
||||
ctt_pre_ww = request("ctt_pre_ww")(i) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
ctt = request("ctt")(i) '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (21.11<EFBFBD><EFBFBD>)
|
||||
ctt_pre_mm = request("ctt_pre_mm")(i) '<27>۳<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br>(20.11<EFBFBD><EFBFBD>)
|
||||
mm_dif = request("mm_dif")(i) '<27><> <20><><EFBFBD><EFBFBD>(%)
|
||||
ctt_add = request("ctt_add")(i) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(21.04~21.11)
|
||||
ctt_add_pre = request("ctt_add_pre")(i) '<27>۳<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(20.4~20.11)
|
||||
ctt_add_dif = request("ctt_add_dif")(i) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
sales_goal = request("sales_goal")(i) '<27><><EFBFBD><EFBFBD> <20><>ǥ<br>21.04.01~22.03.31<br>(Carry over <20><><EFBFBD><EFBFBD>)
|
||||
sales_pre_amount = request("sales_pre_amount")(i) '<27><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
sales_goal_per = request("sales_goal_per")(i) '<27><><EFBFBD><EFBFBD> <20><>ǥ <br><3E><EFBFBD><DEBC><EFBFBD>
|
||||
sales_wip = request("sales_wip")(i) '20<32><30> WIP<br><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
sales_year_dif = request("sales_year_dif")(i) '<27><><EFBFBD><EFBFBD> Vs.<2E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
'Response.write "input_yn(" & i & ") = " & input_yn & "<BR>" ' <20><><EFBFBD>⼭ <20>߿<EFBFBD> for<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ݵ<EFBFBD><DDB5><EFBFBD> 1<><31><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>
|
||||
|
||||
if( input_yn = "insert" )then
|
||||
sql = " "
|
||||
sql = sql & " UPDATE project2.dbo.BG_WEEKNUM_DATA SET del_yn = 'Y', moddate = getdate() "
|
||||
sql = sql & " WHERE BG_CODE = '"& BG_CODE &"' and GP = '"& GP &"' and yearnum = '"& yearnum &"' and weeknum = '"& weeknumb &"' and del_yn = 'N'; "
|
||||
|
||||
sql = sql & " INSERT INTO project2.dbo.BG_WEEKNUM_DATA(BG_CODE, yearnum, weeknum, GP "
|
||||
sql = sql & " , cro, ctt_pre_ww, ctt, ctt_pre_mm, mm_dif, ctt_add, ctt_add_pre, ctt_add_dif "
|
||||
sql = sql & " , sales_goal, sales_pre_amount, sales_goal_per, sales_wip, sales_year_dif "
|
||||
sql = sql & " , regdate) "
|
||||
sql = sql & " VALUES('"& BG_CODE &"', '"& yearnum &"', '"& weeknumb &"', '"& GP &"' "
|
||||
sql = sql & " , '"& cro &"', '"& ctt_pre_ww &"', '"& ctt &"', '"& ctt_pre_mm &"', '"& mm_dif &"', '"& ctt_add &"', '"& ctt_add_pre &"', '"& ctt_add_dif &"' "
|
||||
sql = sql & " , '"& sales_goal &"', '"& sales_pre_amount &"', '"& sales_goal_per &"', '"& sales_wip &"', '"& sales_year_dif &"' "
|
||||
sql = sql & " , getdate()); "
|
||||
else
|
||||
sql = " "
|
||||
sql = sql & " UPDATE project2.dbo.BG_WEEKNUM_DATA "
|
||||
sql = sql & " SET cro = '"& cro &"', ctt_pre_ww = '"& ctt_pre_ww &"', ctt = '"& ctt &"', ctt_pre_mm = '"& ctt_pre_mm &"' "
|
||||
sql = sql & " , mm_dif = '"& mm_dif &"', ctt_add = '"& ctt_add &"', ctt_add_pre = '"& ctt_add_pre &"', ctt_add_dif = '"& ctt_add_dif &"' "
|
||||
sql = sql & " , sales_goal = '"& sales_goal &"', sales_pre_amount = '"& sales_pre_amount &"', sales_goal_per = '"& sales_goal_per &"', sales_wip = '"& sales_wip &"', sales_year_dif = '"& sales_year_dif &"' "
|
||||
sql = sql & " , moddate = getdate() "
|
||||
sql = sql & " WHERE BG_CODE = '"& BG_CODE &"' and GP = '"& GP &"' and yearnum = '"& yearnum &"' and weeknum = '"& weeknumb &"' and del_yn = 'N' ; "
|
||||
end if
|
||||
|
||||
'response.write sql &"<br>"
|
||||
|
||||
dbin.Open adoConn
|
||||
dbin.Execute sql
|
||||
dbin.Close
|
||||
|
||||
|
||||
next
|
||||
End if
|
||||
%>
|
||||
66
statistics/dashboard_ctt_cate_Ajax.asp
Normal file
66
statistics/dashboard_ctt_cate_Ajax.asp
Normal file
@@ -0,0 +1,66 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<!-- #include virtual = "include/JSON_2.0.4.asp" -->
|
||||
|
||||
<%
|
||||
Response.CharSet="euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.AddHeader "cache-control", "no-staff"
|
||||
Response.Expires = -1
|
||||
|
||||
|
||||
tmp_year = request("tmp_year")'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD>
|
||||
|
||||
'response.write " tmp_year = "& tmp_year &"<br>"
|
||||
|
||||
If request("tmp_year") <> "" then
|
||||
query = " "
|
||||
query = query & " select weeknum, sdate, edate, yearnum from project2.dbo.BG_WEEKNUM "
|
||||
query = query & " WHERE del_yn = 'N' "
|
||||
query = query & " and yearnum = '"& tmp_year &"' "
|
||||
query = query & " AND sdate < CONVERT(varchar(10),getdate()+25,120) "
|
||||
query = query & " order by sdate desc; "
|
||||
|
||||
'response.write query &"<br>"
|
||||
|
||||
rsc.Open query, adoConn, 1
|
||||
set json = jsObject()
|
||||
|
||||
Redim data(rsc.recordcount-1)
|
||||
iCnt = 0
|
||||
if not rsc.eof then
|
||||
while not rsc.eof
|
||||
set Contact = jsObject()
|
||||
|
||||
Contact("weeknum") = rsc("weeknum")
|
||||
Contact("sdate") = rsc("sdate")
|
||||
Contact("edate") = rsc("edate")
|
||||
Contact("yearnum") = rsc("yearnum")
|
||||
|
||||
set data(iCnt) = Contact
|
||||
iCnt = iCnt + 1
|
||||
|
||||
rsc.movenext
|
||||
wend
|
||||
|
||||
json("data") = data
|
||||
|
||||
Else
|
||||
json("data") = ""
|
||||
End If
|
||||
rsc.close
|
||||
response.write toJSON(json)
|
||||
|
||||
|
||||
End if
|
||||
|
||||
|
||||
Function AddComma(number)
|
||||
If IsNull (number) Then
|
||||
AddComma = 0
|
||||
ElseIf IsNumeric (number) = False Then
|
||||
AddComma = 0
|
||||
Else
|
||||
AddComma = FormatNumber(number, 0)
|
||||
End If
|
||||
End Function
|
||||
%>
|
||||
202
statistics/inc_team_project.asp
Normal file
202
statistics/inc_team_project.asp
Normal file
@@ -0,0 +1,202 @@
|
||||
<%
|
||||
sql = ""
|
||||
sql = sql & " CREATE TABLE #statistics ( "&VbCrlf
|
||||
sql = sql & " hd_cd varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " hd_name varchar(50) not null, "&VbCrlf
|
||||
sql = sql & " team_cd varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " team_name varchar(50) not null, "&VbCrlf
|
||||
sql = sql & " p_sn varchar(10) not null, "&VbCrlf
|
||||
sql = sql & " p_child_sn varchar(15) not null, "&VbCrlf
|
||||
sql = sql & " p_depart varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " p_statistics varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " p_total_cost money not null, "&VbCrlf
|
||||
sql = sql & " p_cont_cost money not null, "&VbCrlf
|
||||
sql = sql & " est_money money not null, "&VbCrlf
|
||||
sql = sql & " act_money money not null, "&VbCrlf
|
||||
sql = sql & " cost_money money not null, "&VbCrlf
|
||||
sql = sql & " entertain_money money not null, "&VbCrlf
|
||||
sql = sql & " tf_money money not null, "&VbCrlf
|
||||
sql = sql & " benefit money not null, "&VbCrlf
|
||||
sql = sql & " p_progress_status varchar(6) not null, "&VbCrlf
|
||||
sql = sql & " complete_yn varchar(3) not null, "&VbCrlf
|
||||
sql = sql & " p_input_dt datetime not null, "&VbCrlf
|
||||
sql = sql & " p_con_date_end varchar(15) not null "&VbCrlf
|
||||
sql = sql & " ) "&VbCrlf
|
||||
sql = sql & " "&VbCrlf
|
||||
sql = sql & " "&VbCrlf
|
||||
sql = sql & " INSERT INTO #statistics "&VbCrlf
|
||||
sql = sql & " SELECT TG.hd_cd, TG.hd_name, TG.team_cd, TG.team_name, "&VbCrlf
|
||||
sql = sql & " RT.p_sn, RT.p_child_sn, RT.p_depart, RT.p_statistics, "&VbCrlf
|
||||
sql = sql & " CASE WHEN (SELECT COUNT(*) FROM V_PROJECT_METHOD WHERE p_sn = RT.p_sn AND p_statistics < RT.p_statistics) > 0 THEN 0 ELSE "&VbCrlf
|
||||
sql = sql & " CASE WHEN pb_depart <> p_depart_dep AND p_depart_dep <> '900' AND p_depart_dep <> '90' THEN 0 ELSE RT.p_total_cost END "&VbCrlf
|
||||
sql = sql & " END as p_total_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.p_cont_cost END as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.est_money END as est_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.act_money END as act_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.cost_money END as cost_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.entertain_money END as entertain_money, "&VbCrlf
|
||||
sql = sql & " '0' as tf_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE CASE WHEN complete_yn = '1' THEN RT.act_benefit ELSE RT.est_benefit END END as benefit, "&VbCrlf
|
||||
sql = sql & " RT.p_progress_status, RT.complete_yn, p_input_dt, p_con_date_end "&VbCrlf
|
||||
sql = sql & " FROM "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT VPM.p_sn, VPM.p_child_sn, pb_depart, VPM.p_rsch_dept, MP.p_depart_dep, "&VbCrlf
|
||||
sql = sql & " CASE WHEN ISNULL(MP.p_depart_dep, ISNULL(VPM.p_rsch_dept, '')) <> '900' "&VbCrlf
|
||||
sql = sql & " THEN "&VbCrlf
|
||||
sql = sql & " ISNULL(MP.p_depart_dep, VPM.p_rsch_dept) "&VbCrlf
|
||||
sql = sql & " ELSE CASE WHEN ISNULL(VPM.p_field_dept, '') <> '900' THEN '12' ELSE '17' END END as p_depart, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_statistics, '') as p_statistics, "&VbCrlf
|
||||
sql = sql & " ISNULL(MP.p_budget, 0) as p_total_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.est_money, 0) as est_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.act_money, 0) as act_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(AC.cost_money, 0) as cost_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(EM.entertain_money, 0) as entertain_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.est_money, 0) - round((ISNULL(VPM.p_cont_cost, MP.p_cont_cost) * 0.02), 0) as est_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.act_money, 0) - ISNULL(AC.cost_money, 0) - ISNULL(EM.entertain_money, 0) as act_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_progress_status, '000') as p_progress_status, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_research_complete*p_field_complete*p_dp_complete, 0) as complete_yn, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_input_dt, '') <> '' THEN VPM.p_input_dt ELSE convert(varchar(10), convert(datetime, MP.p_input_dt, 23), 120) END, '') as p_input_dt, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_con_date_end, '') <> '' THEN VPM.p_con_date_end ELSE convert(varchar(10), convert(datetime, MP.p_con_date_end), 120) END, '') as p_con_date_end "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD VPM LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT PM.p_sn, P.p_budget, P.p_depart_dep AS pb_depart, ISNULL(PM.p_rsch_dept, P.p_depart_dep) AS p_depart_dep, "&VbCrlf
|
||||
sql = sql & " ISNULL(CONVERT(money, ROUND(P.p_budget * 1.0 / COUNT(*), 0)), 0) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " P.p_input_dt, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) as p_con_date_end "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD PM LEFT OUTER JOIN V_PROJECT P ON PM.p_sn = P.p_sn "&VbCrlf
|
||||
sql = sql & " GROUP BY PM.p_sn, PM.p_sub_type, p_depart_dep, ISNULL(PM.p_rsch_dept, P.p_depart_dep), P.p_budget, P.p_input_dt, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) "&VbCrlf
|
||||
sql = sql & " ) MP ON VPM.p_sn = MP.p_sn AND CASE ISNULL(VPM.p_rsch_dept, '') WHEN '' THEN MP.p_depart_dep ELSE ISNULL(VPM.p_rsch_dept, '') END = MP.p_depart_dep "&VbCrlf
|
||||
sql = sql & " LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_child_sn, SUM(convert(money, est_money)) as est_money, SUM(convert(money, act_money)) as act_money "&VbCrlf
|
||||
sql = sql & " FROM direct_cost "&VbCrlf
|
||||
sql = sql & " WHERE del_yes_no = 'no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(est_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(act_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_child_sn "&VbCrlf
|
||||
sql = sql & " ) DC ON VPM.p_child_sn = DC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn AS p_child_sn, SUM(cost_money) AS cost_money "&VbCrlf
|
||||
sql = sql & " FROM V_BUSI_COST "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) AC ON VPM.p_child_sn = AC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn as p_child_sn, SUM(convert(money, convert(varchar(50), target4))) AS entertain_money "&VbCrlf
|
||||
sql = sql & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "&VbCrlf
|
||||
sql = sql & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1BAB8B0><EFBFBD>' "&VbCrlf
|
||||
sql = sql & " AND del_yes_no='no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) EM ON VPM.p_child_sn = EM.p_child_sn "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(VPM.p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " ) RT LEFT OUTER JOIN TEAM_GROUP TG ON RT.p_depart = TG.team_cd AND TG.div_use = '1' "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(TG.id, '') <> '' "&VbCrlf
|
||||
sql = sql & " ORDER BY ISNULL(TG.id, '') "&VbCrlf
|
||||
|
||||
'Response.write sql&"<br><br><br>"
|
||||
Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
'#########################################################################################
|
||||
'#########################################################################################
|
||||
'--------------------------------------------------------------------------------
|
||||
'--(1)-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ ó<><C3B3><EFBFBD><EFBFBD> #Table
|
||||
sql = ""
|
||||
sql = sql & " CREATE TABLE #temp_prj ( "&vbCrLf
|
||||
sql = sql & " hd_cd varchar(5) not null, "&vbCrLf
|
||||
sql = sql & " hd_name varchar(50) not null, "&vbCrLf
|
||||
sql = sql & " team_cd varchar(5) not null, "&vbCrLf
|
||||
sql = sql & " team_name varchar(50) not null, "&vbCrLf
|
||||
sql = sql & " p_sn varchar(10) not null, "&vbCrLf
|
||||
sql = sql & " p_child_sn varchar(15) not null, "&vbCrLf
|
||||
sql = sql & " p_depart varchar(5) not null, "&vbCrLf
|
||||
sql = sql & " p_statistics varchar(5) not null, "&vbCrLf
|
||||
sql = sql & " p_total_cost money not null, "&vbCrLf
|
||||
sql = sql & " p_cont_cost money not null, "&vbCrLf
|
||||
sql = sql & " est_money money not null, "&vbCrLf
|
||||
sql = sql & " act_money money not null, "&vbCrLf
|
||||
sql = sql & " cost_money money not null, "&vbCrLf
|
||||
sql = sql & " entertain_money money not null, "&vbCrLf
|
||||
sql = sql & " tf_money money not null, "&vbCrLf
|
||||
sql = sql & " benefit money not null, "&vbCrLf
|
||||
sql = sql & " p_progress_status varchar(6) not null, "&vbCrLf
|
||||
sql = sql & " complete_yn varchar(3) not null, "&vbCrLf
|
||||
sql = sql & " p_input_dt datetime not null, "&vbCrLf
|
||||
sql = sql & " p_con_date_end varchar(15) not null "&vbCrLf
|
||||
sql = sql & " ) "&vbCrLf
|
||||
' Response.write sql&"<br><br><br>"
|
||||
' Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
'--------------------------------------------------------------------------------
|
||||
'--(2)-- ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> #temp_prj <20>־<EFBFBD><D6BE><EFBFBD> (p_sn='1702033')
|
||||
sql = ""
|
||||
sql = sql & " insert into #temp_prj "&vbCrLf
|
||||
sql = sql & " (hd_cd, hd_name, team_cd, team_name, p_sn, p_child_sn, p_depart, "&vbCrLf
|
||||
sql = sql & " p_statistics, p_total_cost, p_cont_cost, est_money, act_money, cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money, tf_money, benefit, p_progress_status, complete_yn, p_input_dt, p_con_date_end) "&vbCrLf
|
||||
sql = sql & " select "&vbCrLf
|
||||
sql = sql & " hd_cd, hd_name, team_cd, team_name, p_sn, p_child_sn, p_depart, "&vbCrLf
|
||||
sql = sql & " p_statistics, p_total_cost, p_cont_cost, est_money, act_money, cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money, tf_money, benefit, p_progress_status, complete_yn, p_input_dt, p_con_date_end "&vbCrLf
|
||||
sql = sql & " from #statistics "&vbCrLf
|
||||
sql = sql & " where p_sn='1702033' "&vbCrLf
|
||||
' Response.write sql&"<br><br><br>"
|
||||
' Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
'--------------------------------------------------------------------------------
|
||||
'--(3)-- #temp_prj<72><6A> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> #statistics <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3>(p_sn='1702033')
|
||||
sql = ""
|
||||
sql = sql & " delete from #statistics "&vbCrLf
|
||||
sql = sql & " where p_sn='1702033' "&vbCrLf
|
||||
' Response.write sql&"<br><br><br>"
|
||||
' Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
'--------------------------------------------------------------------------------
|
||||
'--(4)-- <20><><EFBFBD><EFBFBD>1<EFBFBD><31>(60% <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>) (p_sn='1702033')
|
||||
sql = ""
|
||||
sql = sql & " insert into #statistics "&vbCrLf
|
||||
sql = sql & " (hd_cd, hd_name, team_cd, team_name, p_sn, p_child_sn, p_depart, "&vbCrLf
|
||||
sql = sql & " p_statistics, p_total_cost, p_cont_cost, est_money, act_money, cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money, tf_money, benefit, p_progress_status, complete_yn, p_input_dt, p_con_date_end) "&vbCrLf
|
||||
sql = sql & " select "&vbCrLf
|
||||
sql = sql & " hd_cd, hd_name, team_cd, team_name, p_sn, p_child_sn, p_depart, p_statistics, "&vbCrLf
|
||||
sql = sql & " p_total_cost/100.0*60 as p_total_cost, "&vbCrLf
|
||||
sql = sql & " p_cont_cost/100.0*60 as p_cont_cost, "&vbCrLf
|
||||
sql = sql & " est_money/100.0*60 as est_money, "&vbCrLf
|
||||
sql = sql & " act_money/100.0*60 as act_money, "&vbCrLf
|
||||
sql = sql & " cost_money/100.0*60 as cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money/100.0*60 as entertain_money, "&vbCrLf
|
||||
sql = sql & " tf_money/100.0*60 as tf_money, "&vbCrLf
|
||||
sql = sql & " benefit/100.0*60 as benefit, "&vbCrLf
|
||||
sql = sql & " p_progress_status, complete_yn, p_input_dt, p_con_date_end "&vbCrLf
|
||||
sql = sql & " from #temp_prj "&vbCrLf
|
||||
sql = sql & " where p_sn='1702033' "&vbCrLf
|
||||
' Response.write sql&"<br><br><br>"
|
||||
' Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
'--------------------------------------------------------------------------------
|
||||
'--(4)-- <20><><EFBFBD><EFBFBD>2<EFBFBD><32>(40% <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>) (p_sn='1702033')
|
||||
sql = ""
|
||||
sql = sql & " insert into #statistics "&vbCrLf
|
||||
sql = sql & " (hd_cd, hd_name, team_cd, team_name, p_sn, p_child_sn, p_depart, "&vbCrLf
|
||||
sql = sql & " p_statistics, p_total_cost, p_cont_cost, est_money, act_money, cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money, tf_money, benefit, p_progress_status, complete_yn, p_input_dt, p_con_date_end) "&vbCrLf
|
||||
sql = sql & " select "&vbCrLf
|
||||
sql = sql & " hd_cd, hd_name, '32' as team_cd, '<27><><EFBFBD><EFBFBD> 2 <20><>' as team_name, p_sn, p_child_sn, '32' as p_depart, p_statistics, "&vbCrLf
|
||||
sql = sql & " p_total_cost/100.0*40 as p_total_cost, "&vbCrLf
|
||||
sql = sql & " p_cont_cost/100.0*40 as p_cont_cost, "&vbCrLf
|
||||
sql = sql & " est_money/100.0*40 as est_money, "&vbCrLf
|
||||
sql = sql & " act_money/100.0*40 as act_money, "&vbCrLf
|
||||
sql = sql & " cost_money/100.0*40 as cost_money, "&vbCrLf
|
||||
sql = sql & " entertain_money/100.0*40 as entertain_money, "&vbCrLf
|
||||
sql = sql & " tf_money/100.0*40 as tf_money, "&vbCrLf
|
||||
sql = sql & " benefit/100.0*40 as benefit, "&vbCrLf
|
||||
sql = sql & " p_progress_status, complete_yn, p_input_dt, p_con_date_end "&vbCrLf
|
||||
sql = sql & " from #temp_prj "&vbCrLf
|
||||
sql = sql & " where p_sn='1702033' "&vbCrLf
|
||||
'#########################################################################################
|
||||
'#########################################################################################
|
||||
' Response.write sql&"<br><br><br>"
|
||||
' Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
|
||||
%>
|
||||
116
statistics/inc_team_project_ctt.asp
Normal file
116
statistics/inc_team_project_ctt.asp
Normal file
@@ -0,0 +1,116 @@
|
||||
<%
|
||||
sql = ""
|
||||
'sql = sql & " CREATE TABLE #statistics2 ( "&VbCrlf
|
||||
'sql = sql & " hd_cd varchar(5) not null, "&VbCrlf
|
||||
'sql = sql & " hd_name varchar(50) not null, "&VbCrlf
|
||||
'sql = sql & " team_cd varchar(5) not null, "&VbCrlf
|
||||
'sql = sql & " team_name varchar(50) not null, "&VbCrlf
|
||||
'sql = sql & " p_sn varchar(10) not null, "&VbCrlf
|
||||
'sql = sql & " p_child_sn varchar(15) not null, "&VbCrlf
|
||||
'sql = sql & " p_depart varchar(5) not null, "&VbCrlf
|
||||
'sql = sql & " p_statistics varchar(5) not null, "&VbCrlf
|
||||
'sql = sql & " p_total_cost money not null, "&VbCrlf
|
||||
'sql = sql & " p_cont_cost money not null, "&VbCrlf
|
||||
'sql = sql & " est_money money not null, "&VbCrlf
|
||||
'sql = sql & " act_money money not null, "&VbCrlf
|
||||
'sql = sql & " cost_money money not null, "&VbCrlf
|
||||
'sql = sql & " entertain_money money not null, "&VbCrlf
|
||||
'sql = sql & " tf_money money not null, "&VbCrlf
|
||||
'sql = sql & " benefit money not null, "&VbCrlf
|
||||
'sql = sql & " p_progress_status varchar(6) not null, "&VbCrlf
|
||||
'sql = sql & " complete_yn varchar(3) not null, "&VbCrlf
|
||||
'sql = sql & " p_input_dt datetime not null, "&VbCrlf
|
||||
'sql = sql & " p_decide_date varchar(20) null, "&VbCrlf
|
||||
'sql = sql & " p_con_date_end varchar(15) not null "&VbCrlf
|
||||
'sql = sql & " ) "&VbCrlf
|
||||
'sql = sql & " "&VbCrlf
|
||||
'sql = sql & " "&VbCrlf
|
||||
|
||||
sql = sql & " update BG_STATISTICS2 set del_yn = 'Y' where yearnum = '"& tmp_year &"' and weeknum = '"& tmp_week &"'; "&VbCrlf
|
||||
|
||||
sql = sql & " INSERT INTO BG_STATISTICS2 "&VbCrlf
|
||||
sql = sql & " SELECT '"& tmp_year &"' yearnum, '"& tmp_week &"' weeknum, "&VbCrlf
|
||||
sql = sql & " TG.hd_cd, TG.hd_name, TG.team_cd, TG.team_name, "&VbCrlf
|
||||
sql = sql & " RT.p_sn, RT.p_child_sn, RT.p_depart, RT.p_statistics, "&VbCrlf
|
||||
sql = sql & " CASE WHEN (SELECT COUNT(*) FROM V_PROJECT_METHOD WHERE p_sn = RT.p_sn AND p_statistics < RT.p_statistics) > 0 THEN 0 ELSE "&VbCrlf
|
||||
sql = sql & " CASE WHEN pb_depart <> p_depart_dep AND p_depart_dep <> '900' AND p_depart_dep <> '90' THEN 0 ELSE RT.p_total_cost END "&VbCrlf
|
||||
sql = sql & " END as p_total_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.p_cont_cost END as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.est_money END as est_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.act_money END as act_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.cost_money END as cost_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.entertain_money END as entertain_money, "&VbCrlf
|
||||
sql = sql & " '0' as tf_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE CASE WHEN complete_yn = '1' THEN RT.act_benefit ELSE RT.est_benefit END END as benefit, "&VbCrlf
|
||||
sql = sql & " RT.p_progress_status, RT.complete_yn, p_input_dt, p_decide_date, p_con_date_end "&VbCrlf
|
||||
sql = sql & " , getdate(), null, 'N' "&VbCrlf
|
||||
sql = sql & " FROM "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT VPM.p_sn, VPM.p_child_sn, pb_depart, VPM.p_rsch_dept, MP.p_depart_dep, "&VbCrlf
|
||||
sql = sql & " CASE WHEN ISNULL(MP.p_depart_dep, ISNULL(VPM.p_rsch_dept, '')) <> '900' "&VbCrlf
|
||||
sql = sql & " THEN "&VbCrlf
|
||||
sql = sql & " ISNULL(MP.p_depart_dep, VPM.p_rsch_dept) "&VbCrlf
|
||||
sql = sql & " ELSE CASE WHEN ISNULL(VPM.p_field_dept, '') <> '900' THEN '12' ELSE '17' END END as p_depart, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_statistics, '') as p_statistics, "&VbCrlf
|
||||
sql = sql & " ISNULL(MP.p_budget, 0) as p_total_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.est_money, 0) as est_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.act_money, 0) as act_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(AC.cost_money, 0) as cost_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(EM.entertain_money, 0) as entertain_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.est_money, 0) - round((ISNULL(VPM.p_cont_cost, MP.p_cont_cost) * 0.02), 0) as est_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.act_money, 0) - ISNULL(AC.cost_money, 0) - ISNULL(EM.entertain_money, 0) as act_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_progress_status, '000') as p_progress_status, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_research_complete*p_field_complete*p_dp_complete, 0) as complete_yn, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_input_dt, '') <> '' THEN VPM.p_input_dt ELSE convert(varchar(10), convert(datetime, MP.p_input_dt, 23), 120) END, '') as p_input_dt, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_decide_date, '') <> '' THEN VPM.p_decide_date ELSE convert(varchar(10), convert(datetime, MP.p_decide_date, 23), 120) END, '') as p_decide_date, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_con_date_end, '') <> '' THEN VPM.p_con_date_end ELSE convert(varchar(10), convert(datetime, MP.p_con_date_end), 120) END, '') as p_con_date_end "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD VPM LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT PM.p_sn, P.p_budget, P.p_depart_dep AS pb_depart, ISNULL(PM.p_rsch_dept, P.p_depart_dep) AS p_depart_dep, "&VbCrlf
|
||||
sql = sql & " ISNULL(CONVERT(money, ROUND(P.p_budget * 1.0 / COUNT(*), 0)), 0) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " P.p_input_dt, P.p_decide_date, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) as p_con_date_end "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD PM LEFT OUTER JOIN V_PROJECT P ON PM.p_sn = P.p_sn "&VbCrlf
|
||||
sql = sql & " GROUP BY PM.p_sn, PM.p_sub_type, p_depart_dep, ISNULL(PM.p_rsch_dept, P.p_depart_dep), P.p_budget, P.p_input_dt ,P.p_decide_date, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) "&VbCrlf
|
||||
sql = sql & " ) MP ON VPM.p_sn = MP.p_sn AND CASE ISNULL(VPM.p_rsch_dept, '') WHEN '' THEN MP.p_depart_dep ELSE ISNULL(VPM.p_rsch_dept, '') END = MP.p_depart_dep "&VbCrlf
|
||||
sql = sql & " LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_child_sn, SUM(convert(money, est_money)) as est_money, SUM(convert(money, act_money)) as act_money "&VbCrlf
|
||||
sql = sql & " FROM direct_cost "&VbCrlf
|
||||
sql = sql & " WHERE del_yes_no = 'no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(est_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(act_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_child_sn "&VbCrlf
|
||||
sql = sql & " ) DC ON VPM.p_child_sn = DC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn AS p_child_sn, SUM(cost_money) AS cost_money "&VbCrlf
|
||||
sql = sql & " FROM V_BUSI_COST "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) AC ON VPM.p_child_sn = AC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn as p_child_sn, SUM(convert(money, convert(varchar(50), target4))) AS entertain_money "&VbCrlf
|
||||
sql = sql & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "&VbCrlf
|
||||
sql = sql & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1BAB8B0><EFBFBD>' "&VbCrlf
|
||||
sql = sql & " AND del_yes_no='no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) EM ON VPM.p_child_sn = EM.p_child_sn "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(VPM.p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " ) RT LEFT OUTER JOIN TEAM_GROUP TG ON RT.p_depart = TG.team_cd AND TG.div_use = '1' "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(TG.id, '') <> '' "&VbCrlf
|
||||
sql = sql & " ORDER BY ISNULL(TG.id, '') "&VbCrlf
|
||||
|
||||
'Response.write sql&"<br><br><br>"
|
||||
|
||||
''Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
Rs.open sql, adoconn, 3, 1, adCmdText
|
||||
|
||||
|
||||
'#########################################################################################
|
||||
'#########################################################################################
|
||||
|
||||
|
||||
|
||||
%>
|
||||
113
statistics/inc_team_project_next.asp
Normal file
113
statistics/inc_team_project_next.asp
Normal file
@@ -0,0 +1,113 @@
|
||||
<%
|
||||
sql = ""
|
||||
sql = sql & " CREATE TABLE #statistics_next ( "&VbCrlf
|
||||
sql = sql & " hd_cd varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " hd_name varchar(50) not null, "&VbCrlf
|
||||
sql = sql & " team_cd varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " team_name varchar(50) not null, "&VbCrlf
|
||||
sql = sql & " p_sn varchar(10) not null, "&VbCrlf
|
||||
sql = sql & " p_child_sn varchar(15) not null, "&VbCrlf
|
||||
sql = sql & " p_depart varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " p_statistics varchar(5) not null, "&VbCrlf
|
||||
sql = sql & " p_total_cost money not null, "&VbCrlf
|
||||
sql = sql & " p_cont_cost money not null, "&VbCrlf
|
||||
sql = sql & " est_money money not null, "&VbCrlf
|
||||
sql = sql & " act_money money not null, "&VbCrlf
|
||||
sql = sql & " cost_money money not null, "&VbCrlf
|
||||
sql = sql & " entertain_money money not null, "&VbCrlf
|
||||
sql = sql & " tf_money money not null, "&VbCrlf
|
||||
sql = sql & " benefit money not null, "&VbCrlf
|
||||
sql = sql & " p_progress_status varchar(6) not null, "&VbCrlf
|
||||
sql = sql & " complete_yn varchar(3) not null, "&VbCrlf
|
||||
sql = sql & " p_input_dt datetime not null, "&VbCrlf
|
||||
sql = sql & " p_con_date_end varchar(15) not null "&VbCrlf
|
||||
sql = sql & " , p_decide_date varchar(20) null "&VbCrlf
|
||||
sql = sql & " , weeknum int default '0' null "&VbCrlf
|
||||
sql = sql & " ) "&VbCrlf
|
||||
sql = sql & " "&VbCrlf
|
||||
sql = sql & " "&VbCrlf
|
||||
sql = sql & " INSERT INTO #statistics_next "&VbCrlf
|
||||
sql = sql & " SELECT TG.hd_cd, TG.hd_name, TG.team_cd, TG.team_name, "&VbCrlf
|
||||
sql = sql & " RT.p_sn, RT.p_child_sn, RT.p_depart, RT.p_statistics, "&VbCrlf
|
||||
sql = sql & " CASE WHEN (SELECT COUNT(*) FROM V_PROJECT_METHOD WITH(NOLOCK) WHERE p_sn = RT.p_sn AND p_statistics < RT.p_statistics) > 0 THEN 0 ELSE "&VbCrlf
|
||||
sql = sql & " CASE WHEN pb_depart <> p_depart_dep AND p_depart_dep <> '900' AND p_depart_dep <> '90' THEN 0 ELSE RT.p_total_cost END "&VbCrlf
|
||||
sql = sql & " END as p_total_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.p_cont_cost END as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.est_money END as est_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.act_money END as act_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.cost_money END as cost_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE RT.entertain_money END as entertain_money, "&VbCrlf
|
||||
sql = sql & " '0' as tf_money, "&VbCrlf
|
||||
sql = sql & " CASE WHEN RT.p_progress_status < '008' THEN '0' ELSE CASE WHEN complete_yn = '1' THEN RT.act_benefit ELSE RT.est_benefit END END as benefit, "&VbCrlf
|
||||
sql = sql & " RT.p_progress_status, RT.complete_yn, p_input_dt, p_con_date_end "&VbCrlf
|
||||
sql = sql & " , p_decide_date "&VbCrlf
|
||||
sql = sql & " , (SELECT weeknum FROM BG_WEEKNUM with(nolock) WHERE del_yn = 'N' and p_decide_date BETWEEN sdate AND edate) weeknum "&VbCrlf
|
||||
sql = sql & " FROM "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT VPM.p_sn, VPM.p_child_sn, pb_depart, VPM.p_rsch_dept, MP.p_depart_dep, "&VbCrlf
|
||||
sql = sql & " CASE WHEN pb_depart = '12' THEN '12' "&VbCrlf
|
||||
sql = sql & " ELSE ISNULL(MP.p_depart_dep, ISNULL(VPM.p_rsch_dept, '')) END as p_depart, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_statistics, '') as p_statistics, "&VbCrlf
|
||||
sql = sql & " CASE WHEN VPM.p_child_sn IS NULL THEN ISNULL(MP.p_budget, 0) ELSE CASE WHEN PDD.p_child_sn IS NULL THEN 0 ELSE ISNULL(MP.p_budget, 0) END END as p_total_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.est_money, 0) as est_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(DC.act_money, 0) as act_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(AC.cost_money, 0) as cost_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(EM.entertain_money, 0) as entertain_money, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.est_money, 0) - round((ISNULL(VPM.p_cont_cost, MP.p_cont_cost) * 0.02), 0) as est_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_cont_cost, MP.p_cont_cost) - ISNULL(DC.act_money, 0) - ISNULL(AC.cost_money, 0) - ISNULL(EM.entertain_money, 0) as act_benefit, "&VbCrlf
|
||||
sql = sql & " ISNULL(VPM.p_progress_status, '000') as p_progress_status, "&VbCrlf
|
||||
sql = sql & " ISNULL(p_research_complete*p_field_complete*p_dp_complete, 0) as complete_yn, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_input_dt, '') <> '' THEN VPM.p_input_dt ELSE convert(varchar(10), convert(datetime, MP.p_input_dt, 23), 120) END, '') as p_input_dt, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_con_date_end, '') <> '' THEN VPM.p_con_date_end ELSE convert(varchar(10), convert(datetime, MP.p_con_date_end), 120) END, '') as p_con_date_end, "&VbCrlf
|
||||
sql = sql & " ISNULL(CASE WHEN ISNULL(VPM.p_decide_date, '') <> '' THEN VPM.p_decide_date ELSE convert(varchar(10), convert(datetime, MP.p_decide_date, 23), 120) END, '') as p_decide_date "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD VPM WITH(NOLOCK) LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT PM.p_sn, P.p_budget, P.p_depart_dep AS pb_depart, ISNULL(PM.p_rsch_dept, P.p_depart_dep) AS p_depart_dep, "&VbCrlf
|
||||
sql = sql & " ISNULL(CONVERT(money, ROUND(P.p_budget * 1.0 / COUNT(*), 0)), 0) as p_cont_cost, "&VbCrlf
|
||||
sql = sql & " P.p_input_dt, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) as p_con_date_end "&VbCrlf
|
||||
sql = sql & " , P.p_decide_date "&VbCrlf
|
||||
sql = sql & " FROM V_PROJECT_METHOD PM WITH(NOLOCK) LEFT OUTER JOIN V_PROJECT P WITH(NOLOCK) ON PM.p_sn = P.p_sn "&VbCrlf
|
||||
sql = sql & " GROUP BY PM.p_sn, PM.p_sub_type, p_depart_dep, ISNULL(PM.p_rsch_dept, P.p_depart_dep), P.p_budget, P.p_input_dt, ISNULL(ISNULL(P.p_convdate_end, P.p_convdate_end2), P.p_con_date_end) , P.p_decide_date "&VbCrlf
|
||||
sql = sql & " ) MP ON VPM.p_sn = MP.p_sn AND CASE ISNULL(VPM.p_rsch_dept, '') WHEN '' THEN MP.p_depart_dep ELSE ISNULL(VPM.p_rsch_dept, '') END = MP.p_depart_dep "&VbCrlf
|
||||
sql = sql & " LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_child_sn, SUM(convert(money, est_money)) as est_money, SUM(convert(money, act_money)) as act_money "&VbCrlf
|
||||
sql = sql & " FROM direct_cost WITH(NOLOCK) "&VbCrlf
|
||||
sql = sql & " WHERE del_yes_no = 'no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(est_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(act_money, '') <> '' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_child_sn "&VbCrlf
|
||||
sql = sql & " ) DC ON VPM.p_child_sn = DC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn AS p_child_sn, SUM(cost_money) AS cost_money "&VbCrlf
|
||||
sql = sql & " FROM V_BUSI_COST WITH(NOLOCK) "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) AC ON VPM.p_child_sn = AC.p_child_sn LEFT OUTER JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_sn as p_child_sn, SUM(convert(money, convert(varchar(50), target4))) AS entertain_money "&VbCrlf
|
||||
sql = sql & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> WITH(NOLOCK) "&VbCrlf
|
||||
sql = sql & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1BAB8B0><EFBFBD>' "&VbCrlf
|
||||
sql = sql & " AND del_yes_no='no' "&VbCrlf
|
||||
sql = sql & " AND ISNULL(p_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " GROUP BY p_sn "&VbCrlf
|
||||
sql = sql & " ) EM ON VPM.p_child_sn = EM.p_child_sn LEFT JOIN "&VbCrlf
|
||||
sql = sql & " ( "&VbCrlf
|
||||
sql = sql & " SELECT p_child_sn FROM ( "&VbCrlf
|
||||
sql = sql & " SELECT p_child_sn, ROW_NUMBER() OVER(PARTITION BY p_sn ORDER BY P_DECIDE_DATE ASC) AS rnum FROM V_PROJECT_METHOD WITH(NOLOCK) WHERE p_child_sn <> '' "&VbCrlf
|
||||
sql = sql & " ) T WHERE rnum = 1 "&VbCrlf
|
||||
sql = sql & " ) PDD ON VPM.P_CHILD_SN = PDD.p_child_sn "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(VPM.p_child_sn, '') <> '' "&VbCrlf
|
||||
sql = sql & " ) RT LEFT OUTER JOIN TEAM_GROUP TG WITH(NOLOCK) ON RT.p_depart = TG.team_cd AND TG.div_use = '1' "&VbCrlf
|
||||
sql = sql & " WHERE ISNULL(TG.id, '') <> '' "&VbCrlf
|
||||
sql = sql & " ORDER BY ISNULL(TG.id, '') "&VbCrlf
|
||||
|
||||
'Response.write sql&"<br><br><br>"
|
||||
Rs.open sql, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
'#########################################################################################
|
||||
'#########################################################################################
|
||||
|
||||
%>
|
||||
450
statistics/projectlist_cost.asp
Normal file
450
statistics/projectlist_cost.asp
Normal file
@@ -0,0 +1,450 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
p_statistics = request("p_statistics")
|
||||
If p_statistics = "" Then
|
||||
p_statistics = year(date)
|
||||
If cint(month(date)) <= 3 Then
|
||||
p_statistics = p_statistics - 1 ' 4<><34> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>̰<EFBFBD>
|
||||
End If
|
||||
End If
|
||||
nowDate = now()
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
.filterSelect{
|
||||
margin-right:5px;
|
||||
}
|
||||
|
||||
#rsTb > table td{
|
||||
word-break: keep-all;
|
||||
}
|
||||
#rsTb > table > thead > tr > td{
|
||||
cursor:pointer;
|
||||
position:sticky;
|
||||
top:-1px;
|
||||
}
|
||||
#rsTb > table > tbody > tr.over95 > td{
|
||||
background-color:#e85e5e !important;
|
||||
}
|
||||
#rsTb > table > tbody > tr.over85 > td{
|
||||
background-color:#ff9a7e !important;
|
||||
}
|
||||
#rsTb > table > tbody > tr.over75 > td{
|
||||
background-color:#ffc095 !important;
|
||||
}
|
||||
#rsTb > table > tbody > tr.over65 > td{
|
||||
background-color:#ffdb9c !important;
|
||||
}
|
||||
|
||||
#rsTb > table > tbody > tr:hover > td{
|
||||
border-bottom: 1px solid #682dff !important;
|
||||
}
|
||||
|
||||
#rsTb > table > tfoot > #sumTr{
|
||||
background-color:#ffb9b9 !important;
|
||||
font-weight:bold;
|
||||
}
|
||||
.rate_legend{
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 14px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#f_rate_act option[value='under65']{
|
||||
background: #dbe9f2;
|
||||
}
|
||||
#f_rate_act option[value='over65']{
|
||||
background: #ffdb9c;
|
||||
}
|
||||
#f_rate_act option[value='over75']{
|
||||
background: #ffc095;
|
||||
}
|
||||
#f_rate_act option[value='over85']{
|
||||
background: #ff9a7e;
|
||||
}
|
||||
#f_rate_act option[value='over95']{
|
||||
background: #e85e5e;
|
||||
}
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ȳ</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 name="prjfrm" method="post">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-size: 12pt; font-weight: bold;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ȳ - (<span id="thisTime"><%=nowDate%></span> <20><><EFBFBD><EFBFBD>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Filter <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:5 0 0 0">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors" style="font-size:12px;">
|
||||
<tr>
|
||||
<td bgcolor="#DFDFDF" style="padding-left:10px;">
|
||||
<select id="p_statistics">
|
||||
<% For i=2018 To year(date) %>
|
||||
<option value="<%=i%>" <%= iif(cint(i) = cint(p_statistics), " selected ", "") %>><%=cstr(i)%>~<%=RIGHT(cstr(i+1), 2)%></option>
|
||||
<% Next %>
|
||||
</select>
|
||||
</td>
|
||||
<td bgcolor="#DFDFDF" class="tbFilter tahoma_blk" style="padding-left:10px;"></td>
|
||||
<td bgcolor="#DFDFDF" style="padding-left:10px;">
|
||||
<span>
|
||||
<b><3E><><EFBFBD><EFBFBD></b> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
65-75% : <span class="rate_legend" style="background-color:#ffdb9c;"></span>
|
||||
75-85% : <span class="rate_legend" style="background-color:#ffc095;"></span>
|
||||
85-95% : <span class="rate_legend" style="background-color:#ff9a7e;"></span>
|
||||
95% <20><> : <span class="rate_legend" style="background-color:#e85e5e;"></span>
|
||||
</span>
|
||||
</td>
|
||||
<td bgcolor="#DFDFDF" align="right" style="padding-right:10px;">
|
||||
<input type="button" id="btnExport" value="Excel Download"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:10 0 0 0">
|
||||
<div style="width:100%;height:650px;overflow-y:scroll;" id="rsTb">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors js-sort-table" style="font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="js-sort-number align-middle text-center" style="width: ;">No.</td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: ;"><3E><EFBFBD></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: ;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: ;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: ;">Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ</td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: ;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 55px;">ǥ<><C7A5><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 90px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>)</td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 80px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>)</td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 63px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 80px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>)</td>
|
||||
<td class="js-sort-number align-middle text-center" style="width: 63px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: 75px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: 75px;"><3E><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td class="js-sort-string align-middle text-center" style="width: 40px;"><3E><><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15" bgcolor="#d5d5d5" height="1"></td>
|
||||
</tr>
|
||||
<tr id="sumTr"></tr>
|
||||
<tr>
|
||||
<td colspan="15" bgcolor="#d5d5d5" height="1"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT ROW_NUMBER() OVER (ORDER BY TPM.p_child_sn) AS no, p_rsch_dept, p_field_dept, p_is_dept, " & vbCrLf
|
||||
query = query & " DFI.depart_name, " & vbCrLf
|
||||
query = query & " TPM.p_child_sn, TPM.p_subject, VCC.p_cli_company_nm, " & vbCrLf
|
||||
query = query & " TPM.p_method_cd, TPMC.p_method_nm, ISNULL(TPM.p_sample, 0) as p_sample, " & vbCrLf
|
||||
query = query & " TPM.p_cont_cost, ISNULL(DC.sum_est, 0) AS sum_est, " & vbCrLf
|
||||
query = query & " (ISNULL(DC.sum_act, 0) + ISNULL(MC.marketing_cost, 0) + ISNULL(JC.job_money, 0)) AS sum_act, " & vbCrLf
|
||||
query = query & " ISNULL(DC.sum_act, 0) AS sum_act_tmp, " & vbCrLf
|
||||
query = query & " TPM.p_con_date_st, TPM.p_con_date_end, " & vbCrLf
|
||||
query = query & " TPM.p_progress_status, TPM.p_input_complete, " & vbCrLf
|
||||
query = query & " ISNULL(TPM.p_research_complete, 0) AS p_research_complete, " & vbCrLf
|
||||
query = query & " ISNULL(TPM.p_field_complete, 0) AS p_field_complete, " & vbCrLf
|
||||
query = query & " ISNULL(TPM.p_dp_complete, 0) AS p_dp_complete " & vbCrLf
|
||||
query = query & " FROM project2.dbo.T_PROJECT_METHOD TPM LEFT JOIN " & vbCrLf
|
||||
query = query & " project2.dbo.T_PROJECT_BASE TPB ON TPM.p_sn = TPB.p_sn LEFT JOIN " & vbCrLf
|
||||
query = query & " project2.dbo.T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd LEFT JOIN " & vbCrLf
|
||||
query = query & " project2.dbo.V_CLIENT_COMP VCC ON TPM.p_cli_company_cd = VCC.p_cli_company_cd LEFT JOIN " & vbCrLf
|
||||
query = query & " ( " & vbCrLf
|
||||
query = query & " SELECT DISTINCT LEFT(T_Name, 8) AS depart_name, before_t_cd1 AS depart_code " & vbCrLf
|
||||
query = query & " FROM project2.dbo.v_Department " & vbCrLf
|
||||
query = query & " WHERE before_t_cd1 NOT IN ('18', '0') " & vbCrLf
|
||||
query = query & " ) DFI ON CASE WHEN TPM.p_rsch_dept <> '900' THEN TPM.p_rsch_dept ELSE TPB.p_depart_dep END = DFI.depart_code LEFT JOIN " & vbCrLf
|
||||
query = query & " ( " & vbCrLf
|
||||
query = query & " SELECT p_child_sn, " & vbCrLf
|
||||
query = query & " sum(CONVERT(money, est_money)) AS sum_est, " & vbCrLf
|
||||
query = query & " sum(CONVERT(money, act_money)) AS sum_act " & vbCrLf
|
||||
query = query & " FROM project2.dbo.direct_cost " & vbCrLf
|
||||
query = query & " WHERE p_child_sn > '17' AND del_yes_no = 'no' " & vbCrLf
|
||||
query = query & " GROUP BY p_child_sn " & vbCrLf
|
||||
query = query & " ) DC ON TPM.p_child_sn = DC.p_child_sn LEFT JOIN " & vbCrLf
|
||||
query = query & " ( " & vbCrLf
|
||||
query = query & " SELECT M.p_sn, SUM(CONVERT(money, REPLACE(CONVERT(varchar(100), M.target6), ',', ''))) AS marketing_cost " & vbCrLf
|
||||
query = query & " FROM project2.dbo.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M LEFT JOIN project2.dbo.Document D ON M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = D.d_no " & vbCrLf
|
||||
query = query & " WHERE M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F1BAB8B0><EFBFBD>' AND M.del_yes_no = 'no' " & vbCrLf
|
||||
query = query & " AND D.d_order_cnt = '77' " & vbCrLf
|
||||
query = query & " GROUP BY M.p_sn " & vbCrLf
|
||||
query = query & " ) MC ON TPM.p_child_sn = MC.p_sn LEFT JOIN " & vbCrLf
|
||||
query = query & " ( " & vbCrLf
|
||||
query = query & " SELECT CA.p_sn, SUM(CA.cost_money) AS job_money " & vbCrLf
|
||||
query = query & " FROM project2.dbo.V_BUSI_COST CA " & vbCrLf
|
||||
query = query & " WHERE CA.cost_money > 0 " & vbCrLf
|
||||
query = query & " GROUP BY CA.p_sn " & vbCrLf
|
||||
query = query & " ) JC ON TPM.p_child_sn = JC.p_sn " & vbCrLf
|
||||
query = query & " WHERE TPM.p_statistics in ('" & p_statistics & "','" & p_statistics+1 & "') " & vbCrLf
|
||||
if cint(session("Depart_Code")) >= 20 Then
|
||||
query = query & " AND (p_rsch_dept = '" & session("Depart_Code") & "' " & vbCrLf
|
||||
' if session("User_Number") = "20180701" Then '<27><>ȿ<EFBFBD><C8BF>
|
||||
' query = query & " Or p_rsch_dept = '30' Or p_rsch_dept = '62' " & vbCrLf
|
||||
' End If
|
||||
' if session("User_Number") = "20200302" Then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
' query = query & " Or p_rsch_dept = '71' " & vbCrLf
|
||||
' End If
|
||||
query = query & " ) " & vbCrLf
|
||||
Else '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ȳ
|
||||
if session("User_Number") = "20190601" Then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = query & " AND p_rsch_dept in ('71', '72', '73') " & vbCrLf
|
||||
End IF
|
||||
if session("User_Number") = "20160205" Then '<27><><EFBFBD><EFBFBD>ö - 2024-06-18 M3<4D><EFBFBD> (20210105)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>, <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>Է<EFBFBD><D4B7>ؾ<EFBFBD><D8BE><EFBFBD>.
|
||||
query = query & " AND p_rsch_dept in ('61', '62','63','64','65','66') " & vbCrLf
|
||||
End IF
|
||||
End if
|
||||
query = query & " ORDER BY TPM.p_child_sn " & vbCrLf
|
||||
|
||||
adors.Open query, adoConn, 1
|
||||
Dim tmpDepStr
|
||||
jsonRs = "["
|
||||
if adors.RecordCount > 0 then
|
||||
for i = 1 To adors.RecordCount
|
||||
jsonRs = jsonRs & "{"
|
||||
jsonRs = jsonRs & """no"":""" & adors("no") & ""","
|
||||
If adors("depart_name") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳뺣<CCB3>̼<EFBFBD>" Then
|
||||
tmpDepStr = "DIN"
|
||||
ElseIf adors("depart_name") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD><EFBFBD><EFBFBD>" Then
|
||||
tmpDepStr = "DCO"
|
||||
ElseIf adors("depart_name") = "<22><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>θ<EFBFBD><CEB8><EFBFBD>" Then
|
||||
tmpDepStr = "BP"
|
||||
Else
|
||||
tmpDepStr = adors("depart_name")
|
||||
End If
|
||||
|
||||
jsonRs = jsonRs & """depart_name"":""" & tmpDepStr & ""","
|
||||
jsonRs = jsonRs & """p_child_sn"":""" & adors("p_child_sn") & ""","
|
||||
jsonRs = jsonRs & """p_subject"":""" & adors("p_subject") & ""","
|
||||
jsonRs = jsonRs & """p_cli_company_nm"":""" & adors("p_cli_company_nm") & ""","
|
||||
jsonRs = jsonRs & """p_method_nm"":""" & adors("p_method_nm") & ""","
|
||||
jsonRs = jsonRs & """p_sample"":""" & formatNumber(adors("p_sample"), 0) & ""","
|
||||
jsonRs = jsonRs & """p_cont_cost"":""" & formatNumber(cDbl(adors("p_cont_cost")), 0) & ""","
|
||||
jsonRs = jsonRs & """sum_est"":""" & formatNumber(adors("sum_est"), 0) & ""","
|
||||
if adors("p_cont_cost") = "0" Then
|
||||
jsonRs = jsonRs & """rate_est"":""0.00%"","
|
||||
jsonRs = jsonRs & """rate_act"":""0.00%"","
|
||||
else
|
||||
jsonRs = jsonRs & """rate_est"":""" & formatNumber(iif(adors("sum_est")*100/cDbl(adors("p_cont_cost")) > 999, 999.99, adors("sum_est")*100/cDbl(adors("p_cont_cost"))), 2) & "%" & ""","
|
||||
jsonRs = jsonRs & """rate_act"":""" & formatNumber(iif(adors("sum_act")*100/cDbl(adors("p_cont_cost")) > 999, 999.99, adors("sum_act")*100/cDbl(adors("p_cont_cost"))), 2) & "%" & ""","
|
||||
end if
|
||||
jsonRs = jsonRs & """sum_act"":""" & formatNumber(adors("sum_act"), 0) & ""","
|
||||
jsonRs = jsonRs & """p_con_date_st"":""" & adors("p_con_date_st") & ""","
|
||||
jsonRs = jsonRs & """p_con_date_end"":""" & adors("p_con_date_end") & ""","
|
||||
jsonRs = jsonRs & """status"":""" & iif(adors("p_research_complete")+adors("p_field_complete")+adors("p_dp_complete") = 3, "<22><><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD>") & """"
|
||||
jsonRs = jsonRs & "}"
|
||||
adors.MoveNext
|
||||
if not adors.Eof then
|
||||
jsonRs = jsonRs & ","
|
||||
end if
|
||||
Next
|
||||
End if
|
||||
adors.Close
|
||||
jsonRs = jsonRs & "]"
|
||||
|
||||
'response.write query
|
||||
%>
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
var jsonRS = <%=jsonRs%>;
|
||||
var filterCol = ["depart_name", "p_cli_company_nm", "p_method_nm", "status", "rate_act"]; // <20><EFBFBD>, Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><> Filter <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
var filterColKor = ["<22><EFBFBD>", "Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"]; // Filter <20><><EFBFBD>ɿ<EFBFBD><C9BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ѱ<EFBFBD>.
|
||||
var filterObj = new Object();
|
||||
|
||||
function tbDraw(colArr, valArr){
|
||||
var jsonFilter = jsonRS;
|
||||
if(colArr != undefined && valArr != undefined && colArr.length == valArr.length){
|
||||
$.each(colArr, function(idx, obj){
|
||||
if(valArr[idx] != ""){
|
||||
if(obj == "rate_act"){
|
||||
jsonFilter = $.grep(jsonFilter, function(o, i){
|
||||
var tmpBoolean = false;
|
||||
if(valArr[idx] == "under65"){
|
||||
tmpBoolean = o[obj].replace(/[^0-9.]/gi, '')*1 < 65;
|
||||
}else if(valArr[idx] == "over65"){
|
||||
tmpBoolean = o[obj].replace(/[^0-9.]/gi, '')*1 >= 65 && o[obj].replace(/[^0-9.]/gi, '')*1 < 75;
|
||||
}else if(valArr[idx] == "over75"){
|
||||
tmpBoolean = o[obj].replace(/[^0-9.]/gi, '')*1 >= 75 && o[obj].replace(/[^0-9.]/gi, '')*1 < 85;
|
||||
}else if(valArr[idx] == "over85"){
|
||||
tmpBoolean = o[obj].replace(/[^0-9.]/gi, '')*1 >= 85 && o[obj].replace(/[^0-9.]/gi, '')*1 < 95;
|
||||
}else if(valArr[idx] == "over95"){
|
||||
tmpBoolean = o[obj].replace(/[^0-9.]/gi, '')*1 >= 95;
|
||||
}else{
|
||||
|
||||
}
|
||||
return tmpBoolean;
|
||||
});
|
||||
}else{
|
||||
jsonFilter = $.grep(jsonFilter, function(o, i){ return o[obj] == valArr[idx]; });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$.each(filterCol, function(idx, col){
|
||||
filterObj[col] = new Array(); // <20>迭<EFBFBD><E8BFAD> <20>ʱ<EFBFBD>ȭ
|
||||
});
|
||||
|
||||
$("#rsTb > table > tbody").html("");
|
||||
$(".tbFilter").html("");
|
||||
var cont_cost_sum = 0;
|
||||
var sum_est_sum = 0;
|
||||
var sum_act_sum = 0;
|
||||
$.each(jsonFilter, function(idx, obj){
|
||||
var tmpHTML = '';
|
||||
var rate_act_tmp = obj.rate_act.replace(/[^0-9.]/gi, '')*1;
|
||||
var tmpClass = "";
|
||||
if(rate_act_tmp >= 95){
|
||||
tmpClass = "over95";
|
||||
}else if(rate_act_tmp >= 85 && rate_act_tmp < 95){
|
||||
tmpClass = "over85";
|
||||
}
|
||||
else if(rate_act_tmp >= 75 && rate_act_tmp < 85){
|
||||
tmpClass = "over75";
|
||||
}
|
||||
else if(rate_act_tmp >= 65 && rate_act_tmp < 75){
|
||||
tmpClass = "over65";
|
||||
}
|
||||
tmpHTML = tmpHTML + '<tr class="' + tmpClass + '">';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.no + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.depart_name + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">';
|
||||
tmpHTML = tmpHTML + '<a href="javascript:prjOpen(\'' + obj.p_child_sn + '\');">' + obj.p_child_sn + '</a></td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-left align-middle" >' + obj.p_subject + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_cli_company_nm + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_method_nm + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_sample + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_cont_cost + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.sum_est + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.rate_est + '</td>'; //-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.sum_act + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.rate_act + '</td>'; //-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_con_date_st + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.p_con_date_end + '</td>';
|
||||
tmpHTML = tmpHTML + '<td class="text-center align-middle">' + obj.status + '</td>';
|
||||
tmpHTML = tmpHTML + '</tr>';
|
||||
$("#rsTb > table > tbody").append(tmpHTML);
|
||||
cont_cost_sum = cont_cost_sum + (obj.p_cont_cost.replace(/,/gi, '')*1);
|
||||
sum_est_sum = sum_est_sum + (obj.sum_est.replace(/,/gi, '')*1);
|
||||
sum_act_sum = sum_act_sum + (obj.sum_act.replace(/,/gi, '')*1);
|
||||
|
||||
$.each(filterCol, function(i, col){
|
||||
filterObj[col].push(obj[col]);
|
||||
});
|
||||
});
|
||||
$("#rsTb > table > tfoot > #sumTr").html("");
|
||||
var tmpSumHTML = '';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" colspan="7"> <20><> <20><> </td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" style="letter-spacing:-1px;">' + cont_cost_sum.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '</td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" style="letter-spacing:-1px;">' + sum_est_sum.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '</td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" >' + (sum_est_sum*100/cont_cost_sum).toFixed(2) + '%</td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" style="letter-spacing:-1px;">' + sum_act_sum.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + '</td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" >' + (sum_act_sum*100/cont_cost_sum).toFixed(2) + '%</td>';
|
||||
tmpSumHTML = tmpSumHTML + '<td align="center" colspan="3"></td>';
|
||||
$("#rsTb > table > tfoot > #sumTr").append(tmpSumHTML);
|
||||
|
||||
//-- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>
|
||||
$.each(filterObj, function(idx, arr){
|
||||
arr = $.unique(arr.sort());
|
||||
var tmpSelect = "";
|
||||
tmpSelect = tmpSelect + "<select class='filterSelect' id='f_" + idx + "'>";
|
||||
if(idx == "rate_act"){
|
||||
tmpSelect = tmpSelect + "<option value='' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "" ? "selected" : "") : "") + ">" + filterColKor[$.inArray(idx, filterCol)] + "(<28><>ü)</option>";
|
||||
tmpSelect = tmpSelect + "<option value='under65' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "under65" ? "selected" : "") : "") + ">65% <20><></option>";
|
||||
tmpSelect = tmpSelect + "<option value='over65' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "over65" ? "selected" : "") : "") + ">65-75%</option>";
|
||||
tmpSelect = tmpSelect + "<option value='over75' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "over75" ? "selected" : "") : "") + ">75-85%</option>";
|
||||
tmpSelect = tmpSelect + "<option value='over85' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "over85" ? "selected" : "") : "") + ">85-95%</option>";
|
||||
tmpSelect = tmpSelect + "<option value='over95' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "over95" ? "selected" : "") : "") + ">95% <20><></option>";
|
||||
}else{
|
||||
tmpSelect = tmpSelect + "<option value='' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == "" ? "selected" : "") : "") + ">" + filterColKor[$.inArray(idx, filterCol)] + "(<28><>ü)</option>";
|
||||
$.each(arr, function(i, txt){
|
||||
tmpSelect = tmpSelect + "<option value='" + txt + "' " + (valArr != undefined ? (valArr[$.inArray(idx, colArr)] == txt ? "selected" : "") : "") + ">" + txt + "</option>";
|
||||
});
|
||||
}
|
||||
|
||||
//console.log("--- "+ filterColKor[$.inArray(idx, filterCol)] +"--- "+ $.inArray(idx, filterCol) );
|
||||
|
||||
|
||||
tmpSelect = tmpSelect + "</select>";
|
||||
$(".tbFilter").append(tmpSelect);
|
||||
});
|
||||
|
||||
//-- <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//-- <20>쿡<D7B7><ECBFA1> <20>ߺ<EFBFBD> <20><><EFBFBD><EFBFBD> 2020-10-15 12:31:45
|
||||
var foundedinputs = [];
|
||||
$("select[id=f_depart_name] option").each(function() {
|
||||
if($.inArray(this.value, foundedinputs) != -1) $(this).remove();
|
||||
foundedinputs.push(this.value);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function prjOpen(p_child_sn){
|
||||
var url = "/project/project_list2_dep_2014.asp?p_sn=" + p_child_sn.split("_")[0] + "&p_sub_type=C&p_child_sn="+p_child_sn;
|
||||
window.open(url, '', 'left=0,top=0,width=1400,height=800,scrollbars=yes,resizeable=yes');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(document).off("change", ".filterSelect").on("change", ".filterSelect", function(){
|
||||
var colArr = new Array();
|
||||
var valArr = new Array();
|
||||
$.each($(".filterSelect"), function(idx, obj){
|
||||
colArr.push($(obj).attr("id").substr($(obj).attr("id").indexOf("_")+1, 100));
|
||||
valArr.push($(obj).val());
|
||||
});
|
||||
tbDraw(colArr, valArr);
|
||||
});
|
||||
|
||||
tbDraw();
|
||||
|
||||
$("#btnExport").on("click", function(e) {
|
||||
var a = document.createElement('a');
|
||||
var data_type = 'data:application/vnd.ms-excel;charset=euc-kr';
|
||||
var table_html = encodeURIComponent($("#rsTb").html());
|
||||
a.href = data_type + ', ' + table_html;
|
||||
a.download = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȳ '+ $("#thisTime").text() +'.xls';
|
||||
a.click();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#p_statistics").on("change", function(){
|
||||
location.href="./projectlist_cost.asp?p_statistics=" + $("#p_statistics option:selected").val();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
1283
statistics/team_project_body.asp
Normal file
1283
statistics/team_project_body.asp
Normal file
File diff suppressed because it is too large
Load Diff
362
statistics/team_project_count.asp
Normal file
362
statistics/team_project_count.asp
Normal file
@@ -0,0 +1,362 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
tmp_year = request("tmp_year")
|
||||
|
||||
if tmp_year = "" then
|
||||
tmp_year = year(date)
|
||||
end if
|
||||
|
||||
if( 2020 >= tmp_year )then
|
||||
tmp_year = year(date)
|
||||
end if
|
||||
'if( tmp_year > 2023 )then
|
||||
' tmp_year = year(date)
|
||||
'end if
|
||||
|
||||
Dim departCode : departCode = Session("Depart_Code")
|
||||
Dim teamPlace : teamPlace = Session("teamplace")
|
||||
%>
|
||||
<!-- #include virtual = "statistics/inc_team_project_next.asp" -->
|
||||
<%
|
||||
query = ""
|
||||
query = query & " DELETE FROM #statistics_next "
|
||||
query = query & " WHERE 1=1 "
|
||||
if (teamPlace > 3 AND teamPlace < 8) Or session("Depart_Code") = 18 or session("user_number")= "20190108" or session("user_number")= "20031102" Then
|
||||
if session("User_Number") = "20190601" Then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = query & " AND team_cd NOT IN ('71','72','73') "
|
||||
' elseif session("User_Number") = "20190301" Then '<27><><EFBFBD><EFBFBD>ö - 2024-06-18 M3<4D><EFBFBD> (20210105)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>, <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>Է<EFBFBD><D4B7>ؾ<EFBFBD><D8BE><EFBFBD>.
|
||||
' query = query & " AND team_cd NOT IN ('73') "
|
||||
elseif session("User_Number") = "20160205" then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = query & " AND team_cd NOT IN ('61','62','63','64','65','66') "
|
||||
elseif session("User_Number") = "20210107" then '<27>Ż<EFBFBD><C5BB><EFBFBD>
|
||||
query = query & " AND team_cd NOT IN ('91') "
|
||||
elseif session("User_Number") = "20210801" then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = query & " AND team_cd NOT IN ('93') "
|
||||
else
|
||||
query = query & " AND 1=2 "
|
||||
end if
|
||||
' elseif session("User_Number") = "20200302" Then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
' query = query & " AND team_cd NOT IN ('71','72') "
|
||||
else
|
||||
query = query & " AND team_cd <> '" & departCode & "' "
|
||||
End If
|
||||
'response.write teamPlace
|
||||
'response.write query
|
||||
adoconn.Execute query
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD></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 name='team_project_count' method='post'>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" >
|
||||
<tr>
|
||||
<td>
|
||||
<select name=tmp_year>
|
||||
<%
|
||||
Dim temp_minus_yyyy
|
||||
temp_minus_yyyy = 0
|
||||
%>
|
||||
<%for i=cint(year(date)+temp_minus_yyyy) to 2021 step -1 %>
|
||||
<OPTION value='<%=i%>' <%if cint(i) = cint(tmp_year) then%> selected<%end if%> ><%=i%></OPTION>
|
||||
<%next%>
|
||||
</SELECT>
|
||||
<button type="button" class='btn btn-sm btn-primary' onclick='goView();'><3E><>ȸ</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors mb-0">
|
||||
<tr>
|
||||
<td width="20%" class="text-center"><3E>μ<EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "&VbCrlf
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "&VbCrlf
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "&VbCrlf
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "&VbCrlf
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "&VbCrlf
|
||||
query = query & " SUM(benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM "&VbCrlf
|
||||
query = query & " ( "&VbCrlf
|
||||
query = query & " SELECT team_name, team_cd, p_sn, "&VbCrlf'p_total_cost, "
|
||||
query = query & " case when LEFT(p_sn, 2) = '" &RIGHT(tmp_year, 2)-1& "' Then "&VbCrlf
|
||||
query = query & " case when SUM(p_total_cost)='0' Then SUM(p_cont_cost) else SUM(p_total_cost) end "&VbCrlf
|
||||
query = query & " else SUM(p_total_cost) end as p_total_cost, "&VbCrlf '##### <20>̿<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> <20><> <20>հ<EFBFBD> -> 0<><30><EFBFBD≯<EFBFBD> <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(2018-10-24)
|
||||
query = query & " p_decide_date, "&VbCrlf
|
||||
query = query & " weeknum, "&VbCrlf
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "&VbCrlf
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "&VbCrlf
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "&VbCrlf
|
||||
query = query & " SUM(benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM #statistics_next "&VbCrlf
|
||||
query = query & " WHERE ( substring(p_decide_date, 1,4) = '" & tmp_year & "' OR ( substring(p_decide_date, 1,4) = '" & tmp_year - 1 & "' AND p_statistics = '" & tmp_year & "')) "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd, p_sn, p_decide_date, weeknum "&VbCrlf
|
||||
query = query & " ) T "&VbCrlf
|
||||
query = query & " where 1=1 "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd "&VbCrlf
|
||||
query = query & " ORDER BY team_name "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
|
||||
adors.Open query, adoconn, adOpenStatic, adLockReadOnly
|
||||
|
||||
if adors.RecordCount > 0 then
|
||||
%>
|
||||
<%
|
||||
sum_total_cost = 0
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_benefit = 0
|
||||
For i = 1 To adors.RecordCount
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("team_cd")%>')"><%=adors("team_name")%></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_total_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_total_cost = sum_total_cost + cdbl(adors("p_total_cost"))
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.MoveNext
|
||||
Next
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center font-weight-bold"><3E><> <20><></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_total_cost,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<tr>
|
||||
<td>
|
||||
2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors mb-0">
|
||||
<tr>
|
||||
<td width="20%" class="text-center"><3E>μ<EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT team_name, team_cd, p_sn, p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM #statistics_next "&VbCrlf
|
||||
query = query & " WHERE (LEFT(p_sn, 2) = '" & RIGHT(tmp_year, 2) & "' OR (LEFT(p_sn, 2) = '" & RIGHT(tmp_year, 2) - 1 & "' AND p_statistics = '" & tmp_year & "')) "&VbCrlf
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND p_progress_status = '008' AND complete_yn = '0' "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY team_name, team_cd, p_sn, p_total_cost "
|
||||
query = query & " ) T "
|
||||
query = query & " where 1=1 "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd "
|
||||
query = query & " ORDER BY team_name "
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
If tmp_year <> "0000" then
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
%>
|
||||
<!-- loop start -->
|
||||
<%
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
For i = 1 To adors.RecordCount
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("team_cd")%>')"><%=adors("team_name")%></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.movenext
|
||||
next
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center font-weight-bold"><3E><> <20><></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
End if
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<tr>
|
||||
<td>
|
||||
3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors mb-0">
|
||||
<tr>
|
||||
<td width="20%" class="text-center"><3E>μ<EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT LEFT(p_con_date_end, 7) as p_con_date_end, team_name, team_cd, p_sn, p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM #statistics_next "&VbCrlf
|
||||
query = query & " WHERE p_statistics = '" & tmp_year & "' "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND complete_yn = '1' "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY LEFT(p_con_date_end, 7), team_name, team_cd, p_sn, p_total_cost "
|
||||
query = query & " ) T "
|
||||
query = query & " where 1=1 "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd "
|
||||
query = query & " ORDER BY team_name "
|
||||
'Response.Write query & "<br>"
|
||||
If tmp_year <> "0000" then
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
|
||||
if adors.RecordCount > 0 then
|
||||
%>
|
||||
<!-- loop start -->
|
||||
<%
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
For i = 1 To adors.RecordCount
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("team_cd")%>')"><%=adors("team_name")%></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.movenext
|
||||
next
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center font-weight-bold"><3E><> <20><></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="text-right font-weight-bold"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
End if
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function goView() {
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
|
||||
var url = "team_project_count.asp?tmp_year=" + tmp_year;
|
||||
document.team_project_count.action = url;
|
||||
document.team_project_count.submit();
|
||||
}
|
||||
function detailView(depart){
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
var tmp_month = "0";
|
||||
var p_depart = depart;
|
||||
|
||||
var url = "team_project_popup.asp?tmp_year=" + tmp_year + "&tmp_month=" + tmp_month + "&p_depart="+p_depart;
|
||||
url = url + "&command=popup";
|
||||
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=1060, height=650 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
$(function(){
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
1939
statistics/team_project_count_CEO.asp
Normal file
1939
statistics/team_project_count_CEO.asp
Normal file
File diff suppressed because it is too large
Load Diff
340
statistics/team_project_count_detail.asp
Normal file
340
statistics/team_project_count_detail.asp
Normal file
@@ -0,0 +1,340 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
Dim searchDate, tmp_year, tmp_month, team_depart, gubun, currentYear
|
||||
Dim tmp_p_sn, tmp_p_child_sn, tmp_subject, tmp_method_cd
|
||||
Dim s_date, e_date, d_count, p_count, sum_count_money
|
||||
|
||||
searchDate = request("date")
|
||||
team_depart = request("depart")
|
||||
gubun = request("gubun")
|
||||
currentYear = request("currentYear")
|
||||
|
||||
tmp_year = Left(searchDate, 4)
|
||||
If right(searchDate, 2) = "<22>̿<EFBFBD>" Then
|
||||
tmp_year = cstr(cint(tmp_year) + 1)
|
||||
tmp_month = "0"
|
||||
Else
|
||||
tmp_month = right(searchDate, 2)
|
||||
End if
|
||||
%>
|
||||
<!-- #include virtual = "statistics/inc_team_project_next.asp" -->
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" class="p-2">
|
||||
<!-------------------1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<% If CStr(gubun) = "1" Then %>
|
||||
<tr><td><%=Left(searchDate, 4)&"<22><> "%><%=right(searchDate, 2)&"<22><> "%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="11%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(weeknum)</td>
|
||||
<td width="11%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
|
||||
<td width="30%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="12%" class="text-center"><3E><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD></td>
|
||||
<td width="12%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="12%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="12%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT S.team_name, S.team_cd, S.p_sn, V.p_subject, SUM(S.p_total_cost) as p_total_cost "&VbCrlf
|
||||
query = query & " , S.p_decide_date "&VbCrlf
|
||||
query = query & " , S.weeknum "&VbCrlf
|
||||
query = query & " , SUM(S.p_cont_cost) as p_cont_cost, SUM(S.est_money) as est_money "&VbCrlf
|
||||
query = query & " , SUM(S.act_money) as act_money, SUM(S.cost_money) as cost_money "&VbCrlf
|
||||
query = query & " , SUM(S.entertain_money) as entertain_money, SUM(S.tf_money) as tf_money "&VbCrlf
|
||||
query = query & " , SUM(S.benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM #statistics_next S LEFT OUTER JOIN V_PROJECT V ON S.p_sn = V.p_sn "&VbCrlf
|
||||
query = query & " WHERE 1=1 "&VbCrlf
|
||||
if tmp_month = "0" then
|
||||
query = query & " AND substring(S.p_decide_date, 1,7) < '" & tmp_year & "-01' AND S.p_statistics = '" & currentYear & "' "&VbCrlf
|
||||
else
|
||||
query = query & " AND substring(S.p_decide_date, 1,7) = '" & tmp_year &"-"& tmp_month & "' "&VbCrlf
|
||||
end if
|
||||
query = query & " AND (S.hd_cd = '"& team_depart &"' or S.team_cd = '"& team_depart &"') "&VbCrlf
|
||||
query = query & " GROUP BY S.team_name, S.team_cd, S.p_sn, V.p_subject, S.p_decide_date, S.weeknum "&VbCrlf
|
||||
query = query & " ORDER BY S.team_name, S.p_decide_date, S.weeknum, S.p_sn "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
'adminView("<br>1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>")
|
||||
'adminView(query)
|
||||
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
Dim total_cost
|
||||
Dim cont_cost
|
||||
sum_total_cost = 0
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_benefit = 0
|
||||
|
||||
Do while Not adors.Eof
|
||||
total_cost = adors("p_total_cost")
|
||||
cont_cost = adors("p_cont_cost")
|
||||
|
||||
If right(searchDate, 2) = "<22>̿<EFBFBD>" Then'##### <20>̿<EFBFBD><CCBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȹ<EFBFBD><C8B9> <20>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(2018-10-24)
|
||||
If total_cost = 0 Then total_cost = cont_cost
|
||||
End If
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><%=adors("p_decide_date") %><br>(<%=adors("weeknum") %>)</td>
|
||||
<td class="text-center"><%=adors("p_sn") %></td>
|
||||
<td class="text-left"><%=adors("p_subject") %></td>
|
||||
<td class="text-right"><%=formatnumber(total_cost,0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cont_cost,0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_total_cost = sum_total_cost + cdbl(total_cost)
|
||||
sum_cont_cost = sum_cont_cost + cdbl(cont_cost)
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.MoveNext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center" colspan="3"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_total_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<% End If %>
|
||||
<!-------------------1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<% If CStr(gubun) = "2" Then %>
|
||||
<tr><td><%=Left(searchDate, 4)&"<22><> "%><%=right(searchDate, 2)&"<22><> "%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(weeknum)</td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
|
||||
<td width="30%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT S.team_name, S.team_cd, S.p_child_sn, V.p_subject, S.p_total_cost, V.p_method_cd, V.p_sub_type "&VbCrlf
|
||||
query = query & " , S.p_decide_date "&VbCrlf
|
||||
query = query & " , S.weeknum "&VbCrlf
|
||||
query = query & " , SUM(S.p_cont_cost) as p_cont_cost, SUM(S.est_money) as est_money "&VbCrlf
|
||||
query = query & " , SUM(S.act_money) as act_money, SUM(S.cost_money) as cost_money "&VbCrlf
|
||||
query = query & " , SUM(S.entertain_money) as entertain_money, SUM(S.tf_money) as tf_money "&VbCrlf
|
||||
query = query & " , SUM(S.benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM #statistics_next S LEFT OUTER JOIN V_PROJECT_METHOD V ON S.p_child_sn = V.p_child_sn "&VbCrlf
|
||||
query = query & " WHERE 1=1 "&VbCrlf
|
||||
if tmp_month = "0" then
|
||||
query = query & " AND substring(S.p_child_sn, 1,4) < '" & right(tmp_year, 2) & "01' AND S.p_statistics = '" & currentYear & "' "&VbCrlf
|
||||
else
|
||||
query = query & " AND substring(S.p_child_sn, 1,4) = '" & right(tmp_year, 2) & tmp_month & "' "&VbCrlf
|
||||
end if
|
||||
query = query & " AND (S.hd_cd = '"& team_depart &"' or S.team_cd = '"& team_depart &"') "&VbCrlf
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND S.p_progress_status = '008' AND S.complete_yn = '0' "&VbCrlf
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY S.team_name, S.team_cd, S.p_child_sn, V.p_subject, S.p_total_cost, V.p_method_cd, V.p_sub_type "&VbCrlf
|
||||
query = query & " , S.p_decide_date, S.weeknum "&VbCrlf
|
||||
query = query & " ORDER BY S.team_name, S.p_child_sn "&VbCrlf
|
||||
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
Do while Not adors.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><%=adors("p_decide_date") %><br>(<%=adors("weeknum") %>)</td>
|
||||
<td class="text-center"><%=adors("p_child_sn") %></td>
|
||||
<td class="text-left">
|
||||
<a href="javascript:openit('1','<%=LEFT(adors("p_child_sn"), 7)%>','<%=adors("p_sub_type")%>','<%=adors("p_method_cd")%>','<%=adors("p_child_sn")%>')" class="blue"><%=adors("p_subject") %></a>
|
||||
</td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.MoveNext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center" colspan="3"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<% End If %>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<% If CStr(gubun) = "3" Then %>
|
||||
<tr><td><%=Left(searchDate, 4)&"<22><> "%><%=right(searchDate, 2)&"<22><> "%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>(weeknum)</td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
|
||||
<td width="30%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT LEFT(S.p_con_date_end, 7) as p_con_date_end, S.team_name, S.team_cd, S.p_child_sn, V.p_subject, S.p_total_cost, V.p_method_cd, V.p_sub_type "&vbCrlf
|
||||
query = query & " , S.p_decide_date "&VbCrlf
|
||||
query = query & " , S.weeknum "&VbCrlf
|
||||
query = query & " , SUM(S.p_cont_cost) as p_cont_cost, SUM(S.est_money) as est_money "&vbCrlf
|
||||
query = query & " , SUM(S.act_money) as act_money, SUM(S.cost_money) as cost_money "&vbCrlf
|
||||
query = query & " , SUM(S.entertain_money) as entertain_money, SUM(S.tf_money) as tf_money "&vbCrlf
|
||||
query = query & " , SUM(S.benefit) as benefit "&vbCrlf
|
||||
query = query & " FROM #statistics_next S LEFT OUTER JOIN V_PROJECT_METHOD V ON S.p_child_sn = V.p_child_sn "&vbCrlf
|
||||
query = query & " WHERE S.p_statistics = '" & currentYear & "' "&vbCrlf
|
||||
if tmp_month = "0" then
|
||||
query = query & " AND LEFT(S.p_con_date_end, 7) < '" & tmp_year & "-01' "&vbCrlf
|
||||
else
|
||||
query = query & " AND LEFT(S.p_con_date_end, 7) = '" & tmp_year & "-" & tmp_month & "' "&vbCrlf
|
||||
end if
|
||||
query = query & " AND (S.hd_cd = '"& team_depart &"' or S.team_cd = '"& team_depart &"') "&vbCrlf
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND S.complete_yn = '1' "&vbCrlf
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY S.p_con_date_end, S.team_name, S.team_cd, S.p_child_sn, V.p_subject, S.p_total_cost, V.p_method_cd, V.p_sub_type "&vbCrlf
|
||||
query = query & " , S.p_decide_date, S.weeknum "&VbCrlf
|
||||
query = query & " ORDER BY S.team_name, S.p_child_sn "&vbCrlf
|
||||
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
Do while Not adors.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><%=adors("p_decide_date") %><br>(<%=adors("weeknum") %>)</td>
|
||||
<td class="text-center"><%=adors("p_child_sn") %></td>
|
||||
<td class="text-left">
|
||||
<a href="javascript:openit('1','<%=LEFT(adors("p_child_sn"), 7)%>','<%=adors("p_sub_type")%>','<%=adors("p_method_cd")%>','<%=adors("p_child_sn")%>')" class="blue"><%=adors("p_subject") %></a>
|
||||
</td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
adors.MoveNext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center" colspan="3"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if
|
||||
adors.Close
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<% End If %>
|
||||
<!-------------------3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function openit(a, z, x, y, v) {
|
||||
if (a == 1) {
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> Ȯ<><C8AE>
|
||||
if (new_project_2014(z) == 1) {
|
||||
var url = '../project/project_list2_dep.asp?p_sn=' + z;
|
||||
}else{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȹ<EFBFBD><C8B9> <20>Ǵ<EFBFBD>(p_subtype<70><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȹ<EFBFBD><C8B9><EFBFBD><EFBFBD> <20><><EFBFBD>ٰ<EFBFBD> <20>Ǵ<EFBFBD>)
|
||||
if (x != '') {
|
||||
var url = '../project/project_list2_dep_2014.asp?p_sn=' + z;
|
||||
}else{
|
||||
if(confirm("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȹ<EFBFBD><C8B9> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD>.\n<><6E><EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD> ȭ<><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD><CCB5>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
var url = '../project/project_contact_2014.asp?p_sn=' + z;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var tmp_width = 1400;
|
||||
var tmp_height = 800;
|
||||
|
||||
if (v != "") {
|
||||
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y + "&p_child_sn=" + v;
|
||||
}else{
|
||||
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y;
|
||||
}
|
||||
}
|
||||
window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes')
|
||||
}
|
||||
|
||||
$(function(){
|
||||
cutmenu();
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
340
statistics/team_project_popup.asp
Normal file
340
statistics/team_project_popup.asp
Normal file
@@ -0,0 +1,340 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
tmp_year = request("tmp_year")
|
||||
p_depart = request("p_depart")
|
||||
|
||||
if tmp_year = "" then
|
||||
tmp_year = "0000"
|
||||
end if
|
||||
|
||||
if p_depart = "" then
|
||||
p_depart = session("depart_Code")
|
||||
end If
|
||||
%>
|
||||
<!-- #include virtual = "statistics/inc_team_project_next.asp" -->
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><EFBFBD> <20><><EFBFBD><EFBFBD></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 name='team_project_count' method='post'>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" class="p-2">
|
||||
<tr>
|
||||
<td>
|
||||
<select name=tmp_year>
|
||||
<%
|
||||
Dim temp_minus_yyyy
|
||||
temp_minus_yyyy = 0
|
||||
%>
|
||||
<%for i=cint(year(date)+temp_minus_yyyy) to 2021 step -1 %>
|
||||
<OPTION value='<%=i%>' <%if cint(i) = cint(tmp_year) then%> selected<%end if%> ><%=i%></OPTION>
|
||||
<%next%>
|
||||
</SELECT>
|
||||
<button type="button" class='btn btn-sm btn-primary' onclick='goView();'><3E><>ȸ</button>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<tr><td>1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="16%" class="text-center"><3E><></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "&VbCrlf
|
||||
query = query & " CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END as p_date, "&VbCrlf
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "&VbCrlf
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "&VbCrlf
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "&VbCrlf
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "&VbCrlf
|
||||
query = query & " SUM(benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM "&VbCrlf
|
||||
query = query & " ( "&VbCrlf
|
||||
query = query & " SELECT team_name, team_cd, p_sn, "&VbCrlf
|
||||
query = query & " case when LEFT(p_sn, 2) = '" &RIGHT(tmp_year, 2)-1& "' Then case when SUM(p_total_cost)='0' Then SUM(p_cont_cost) else SUM(p_total_cost) end else SUM(p_total_cost) end as p_total_cost "&VbCrlf '##### <20>̿<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> <20><> <20>հ<EFBFBD> -> 0<><30><EFBFBD≯<EFBFBD> <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD> = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (2018-10-24)
|
||||
query = query & " , p_decide_date "&VbCrlf
|
||||
query = query & " , weeknum "&VbCrlf
|
||||
query = query & " , SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "&VbCrlf
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "&VbCrlf
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "&VbCrlf
|
||||
query = query & " SUM(benefit) as benefit "&VbCrlf
|
||||
query = query & " FROM #statistics_next "&VbCrlf
|
||||
query = query & " WHERE 1=1 "&VbCrlf
|
||||
query = query & " AND ( substring(p_decide_date, 1,4) = '" & tmp_year & "' OR ( substring(p_decide_date, 1,4) = '" & tmp_year - 1 & "' AND p_statistics = '" & tmp_year & "')) "&VbCrlf
|
||||
query = query & " AND (hd_cd = '"& p_depart &"' or team_cd = '"& p_depart &"') "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd, p_sn, p_decide_date, weeknum "&VbCrlf
|
||||
query = query & " ) T "&VbCrlf
|
||||
query = query & " GROUP BY team_name, team_cd "&VbCrlf
|
||||
query = query & " , CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END "&VbCrlf
|
||||
query = query & " ORDER BY team_name "&VbCrlf
|
||||
query = query & " , CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END "&VbCrlf
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
'adminView("<br>1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>")
|
||||
'adminView(query)
|
||||
|
||||
If tmp_year <> "0000" then
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
sum_total_cost = 0
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_benefit = 0
|
||||
|
||||
Do while Not adors.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("p_date")%>', '<%=adors("team_cd")%>', 1, '<%=tmp_year%>')"><%=adors("p_date") %></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_total_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_total_cost = sum_total_cost + cdbl(adors("p_total_cost"))
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.MoveNext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_total_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
End if
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------1. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<tr><td>2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="16%" class="text-center"><3E><></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "
|
||||
query = query & " CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END as p_date, "
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT team_name, team_cd, p_sn, p_total_cost, p_decide_date, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM #statistics_next "
|
||||
query = query & " WHERE 1=1 "
|
||||
query = query & " AND (substring(p_sn, 1,2) = '" & right(tmp_year, 2) & "' OR (substring(p_sn, 1,2) = '" & right(tmp_year, 2) - 1 & "' AND p_statistics = '" & tmp_year & "')) "
|
||||
query = query & " AND (hd_cd = '"& p_depart &"' or team_cd = '"& p_depart &"') "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND p_progress_status = '008' AND complete_yn = '0' "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY team_name, team_cd, p_sn, p_total_cost, p_decide_date "
|
||||
query = query & " ) T "
|
||||
query = query & " GROUP BY team_name, team_cd, "
|
||||
query = query & " CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END "
|
||||
query = query & " ORDER BY team_name, CASE WHEN substring(p_decide_date, 3,2) = '" & cstr(cint(RIGHT(tmp_year, 2)) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE '20' + substring(p_decide_date, 3,2) + '-' + substring(p_decide_date, 6,2) END "
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
If tmp_year <> "0000" then
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
|
||||
Do while not adors.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("p_date")%>', '<%=p_depart%>', 2, '<%=tmp_year%>')"><%=adors("p_date") %></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.movenext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
End if
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------2. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<!-------------------3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
<tr><td>3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td width="16%" class="text-center"><3E><></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="21%" class="text-center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<% '3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = ""
|
||||
query = query & " SELECT team_name, team_cd, "
|
||||
query = query & " CASE WHEN LEFT(p_con_date_end, 4) = '" & cstr(cint(tmp_year) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE p_con_date_end END as p_date, "
|
||||
query = query & " SUM(p_total_cost) as p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT LEFT(p_con_date_end, 7) as p_con_date_end, team_name, team_cd, p_sn, p_total_cost, "
|
||||
query = query & " SUM(p_cont_cost) as p_cont_cost, SUM(est_money) as est_money, "
|
||||
query = query & " SUM(act_money) as act_money, SUM(cost_money) as cost_money, "
|
||||
query = query & " SUM(entertain_money) as entertain_money, SUM(tf_money) as tf_money, "
|
||||
query = query & " SUM(benefit) as benefit "
|
||||
query = query & " FROM #statistics_next "
|
||||
query = query & " WHERE p_statistics = '" & tmp_year & "' "
|
||||
query = query & " AND (hd_cd = '"& p_depart &"' or team_cd = '"& p_depart &"') "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " AND complete_yn = '1' "
|
||||
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <20><><EFBFBD><EFBFBD> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
query = query & " GROUP BY LEFT(p_con_date_end, 7), team_name, team_cd, p_sn, p_total_cost "
|
||||
query = query & " ) T "
|
||||
query = query & " GROUP BY team_name, team_cd, "
|
||||
query = query & " CASE WHEN LEFT(p_con_date_end, 4) = '" & cstr(cint(tmp_year) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE p_con_date_end END "
|
||||
query = query & " ORDER BY team_name, CASE WHEN LEFT(p_con_date_end, 4) = '" & cstr(cint(tmp_year) - 1) & "' THEN '"& cstr(cint(tmp_year) - 1) &"<22><> <20>̿<EFBFBD>' ELSE p_con_date_end END "
|
||||
|
||||
'Response.Write query & "<br>"
|
||||
If tmp_year <> "0000" then
|
||||
adors.Open query, adoconn,adOpenStatic,adLockReadOnly
|
||||
if adors.RecordCount > 0 then
|
||||
sum_cont_cost = 0
|
||||
sum_est_money = 0
|
||||
sum_act_money = 0
|
||||
sum_benefit = 0
|
||||
|
||||
Do while not adors.Eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="text-center"><a href="javascript:detailView('<%=adors("p_date")%>', '<%=p_depart%>', 3, '<%=tmp_year%>')"><%=adors("p_date") %></a></td>
|
||||
<td class="text-right"><%=formatnumber(adors("p_cont_cost"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("est_money"),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money")),0) %></td>
|
||||
<td class="text-right"><%=formatnumber(adors("benefit"),0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
sum_cont_cost = sum_cont_cost + cdbl(adors("p_cont_cost"))
|
||||
sum_est_money = sum_est_money + cdbl(adors("est_money"))
|
||||
sum_act_money = sum_act_money + cdbl(adors("act_money")) + cdbl(adors("cost_money")) + cdbl(adors("entertain_money")) + cdbl(adors("tf_money"))
|
||||
sum_benefit = sum_benefit + cdbl(adors("benefit"))
|
||||
|
||||
adors.movenext
|
||||
Loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="font-weight-bold text-center"><3E><> <20><></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_cont_cost,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_est_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_act_money,0) %></td>
|
||||
<td class="font-weight-bold text-right"><%=formatnumber(sum_benefit,0) %></td>
|
||||
</tr>
|
||||
<%
|
||||
end if' if adors.RecordCount > 0 then
|
||||
adors.Close
|
||||
End if
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-------------------3. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>------------------------------------------------------------------------------------------------------------------------------------------------------>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function goView() {
|
||||
var tmp_year = document.team_project_count.tmp_year.value;
|
||||
|
||||
var url = "team_project_popup.asp?tmp_year=" + tmp_year + "&p_depart=<%=p_depart%>";
|
||||
document.team_project_count.action = url;
|
||||
document.team_project_count.submit();
|
||||
}
|
||||
|
||||
function detailView(date, depart, gubun, currentYear){
|
||||
var url = "team_project_count_detail.asp"
|
||||
var param = "?date=" + date;
|
||||
param = param + "&depart=" + depart;
|
||||
param = param + "&gubun=" + gubun;
|
||||
param = param + "¤tYear=" + currentYear;
|
||||
param = param + "&command=" + "popup";
|
||||
|
||||
window.open(url+param,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=1060, height=650 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
|
||||
$(function(){
|
||||
cutmenu();
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user