c-innovacion2/resoft/cms_for_bcb/process/bcb_back/view.jsp

429 lines
21 KiB
Plaintext

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/include/include.jsp"%>
<%@include file="/include/head.jsp"%>
<%@include file="/cms_for_bcb/show_top.jsp"%>
<%
String[] hy_title = new String[10];
hy_title[1] = "Key Partners";
hy_title[2] = "Key Activities";
hy_title[3] = "Value Propositions";
hy_title[4] = "Customer Relationships";
hy_title[5] = "Customer Segments";
hy_title[6] = "Key Resources";
hy_title[7] = "Channels";
hy_title[8] = "Cost Structure";
hy_title[9] = "Revenue Streams";
int c_channel = Integer.parseInt(r_call(request.getParameter("c_channel")));
%>
<table width="100%" cellpadding=0 cellspacing=0>
<tr><td style="padding-bottom:5px;padding-top:5px;border-bottom: 1px solid #eeeeee;text-align:center">
<h5 class="theme-color" style="color:#22455E;text-align:center">
<table cellspacing=0 cellpadding=0 align=center>
<tr><td>
<table width=50 cellspacing=1 cellpadding=0 bgcolor=ffffff height="30px">
<%for(int i = 1; i<10 ; i++){%>
<%if(i==1 || i==6 || i==8){%>
<tr >
<%}%>
<td id="td_<%=i%>" style="border:1px solid #343434;text-align:center" bgcolor="<%if(i == c_channel){%>#EE0000<%}else{%>#ededed<%}%>" <%if(i<6){%>width="20%"<%}%> <%if(i==8 || i==9){%> width="50%" colspan=3<%}%> <%if(i==1 || i==3 || i==5){%>rowspan=2<%}%> <%if(i==3){%>colspan=2<%}%>>
</td>
<%if(i==5 || i==7 || i==9){%>
</tr>
<%}%>
<%}%>
</table>
</td><td style="padding-left:10px">
<font color=red><%=hy_title[c_channel]%></font> Period Detail
</td></tr></table>
</h5>
</td>
</tr>
<tr><td align=right style="padding-right:10px;padding-bottom:5px;padding-top:5px">
<a href="#none" onclick="photo_go('bmc','channel_detail.png')" title="화면저장"><img src="/images/icon/photo.gif" alt="" height="20px"></a>
</td></tr></table>
<table width=100% cellspacing=2 cellpadding=0 bgcolor=ffffff style="min-width:1100px" id="bmc">
<tr height=100>
<%for (int i = 1; i < c_p_p + 1; i++){%>
<td valign=top style="border:4px solid #ffffff;text-align:center" bgcolor="ededed" width="<%=100/(c_p_p + 1)%>%" onmouseover="this.bgColor='#FBF0EF'" onmouseout="this.bgColor='#ededed'">
<table width="100%" cellspacing=2 cellpadding=0 >
<tr><td height=34 style="text-align:center;padding-left:10px;font-size:14px" colspan=2>
<%if( i == today_period ){%>
<font color="red">
<%}%>
<%if( i > today_period ){%>
<font color="#cdcdcd">
<%}%>
<b><%=i%> Period</b>
</td></tr>
<tr><td colspan=2 style="padding-left:3px;padding-right:2px;padding-bottom:3px;">
<%if( i <= today_period ){%>
<div style="overflow-y:auto;height:500px;width:100%;">
<%
String sql_hypo = " select a.*, b.c_name as writer_name ";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 2count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 2 and d.c_date <= '"+ a_w_e[i] + " 23:59:59" +"') as 2count";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 1count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 1 and d.c_date <= '"+ a_w_e[i] + " 23:59:59" +"') as 1count";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 0count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 0 and d.c_date <= '"+ a_w_e[i] + " 23:59:59" +"') as 0count";
sql_hypo = sql_hypo + ", (select max(e.c_no) from tbl_hypo_history e where e.c_hypo_no = a.c_no and e.c_date <= '"+ a_w_e[i] + " 23:59:59" +"' ) as c_last_now ";
sql_hypo = sql_hypo + " from tbl_hypo a ";
sql_hypo = sql_hypo + " inner join tbl_member b on b.c_no = a.c_member_no ";
sql_hypo = sql_hypo + " where (a.c_use = 0 or ( a.c_use = 1 and a.c_use_date > '"+ a_w_e[i] + " 23:59:59" +"' ) ) and a.c_team_no = "+ c_team +" and a.c_channel = "+ c_channel +" and a.c_date <= '"+ a_w_e[i] + " 23:59:59" +"' ";
sql_hypo = sql_hypo + " order by a.c_no desc";
ResultSet rs_hypo = stmt2.executeQuery(sql_hypo);
while(rs_hypo.next()){
%>
<%
int now_call = 0;
String sql_hypo_history = " select c_now from tbl_hypo_history where c_no = " + rs_hypo.getInt("c_last_now") + " ";
ResultSet rs_hypo_history = stmt.executeQuery(sql_hypo_history);
if(rs_hypo_history.next()){
now_call = rs_hypo_history.getInt("c_now");
}
rs_hypo_history.close();
%>
<div style="background:#ffffff;width:100%;padding:5px;border:1px solid #cdcdcd" onmouseover="document.getElementById('hypo_<%=rs_hypo.getString("c_no")%>_<%=i%>').style.display='block'" onmouseout="document.getElementById('hypo_<%=rs_hypo.getString("c_no")%>_<%=i%>').style.display='none'">
<table width=100% cellspacing=0 cellpadding=0 >
<tr><td align=left >
<%if(now_call == 2){%>
<a href="hypo/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_no")%>&c_channel=<%=i%>"><font color=red><strike><%=rs_hypo.getString("c_title")%></strike></font></a>
<%}else{%>
<a href="hypo/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_no")%>&c_channel=<%=i%>"><%=rs_hypo.getString("c_title")%></a>
<%}%>
</td><td width="40" align=right valign=top>
<%if(now_call == 0){%>
<font color="#12122"><b><img src="/images/icon/exp_ani.gif" height="34px" alt=""></b></font>
<%}%>
<%if(now_call == 1){%>
<font color="Blue"><b><img src="/images/icon/exp_val.png" height="34px" alt=""></b></font>
<%}%>
<%if(now_call == 2){%>
<font color="Red"><b><img src="/images/icon/exp_inval.png" height="34px" alt=""></b></font>
<%}%>
</td></tr>
<tr id="hypo_<%=rs_hypo.getString("c_no")%>_<%=i%>" style="display:none;">
<td style="vertical-align:bottom;padding-top:10px" colspan=2 align=left >
<%=rs_hypo.getString("c_date").substring(0,10)%> /
<%=rs_hypo.getString("writer_name")%><br>
<b><nobr><font color=blue><img src="/images/icon/good.png" height="20px" alt=""> <%=rs_hypo.getInt("2count")%></font></nobr>
&nbsp;&nbsp;
<nobr><font color=#121212><img src="/images/icon/soso.png" height="20px" alt=""> <%=rs_hypo.getInt("1count")%></font></nobr>
&nbsp;&nbsp;
<nobr><font color=Orange><img src="/images/icon/bad.png" height="20px" alt=""> <%=rs_hypo.getInt("0count")%></nobr></font></b>
</td></tr>
<tr><td height=16 align=right colspan=2>
<%
if(c_channel==5){
%>
<font color="#<%=rs_hypo.getString("c_color")%>">■</font>
<%
}else{%>
<%
String sql_hypo_cs = " select c_cs_color from tbl_hypo_cs where c_hypo_no = " + rs_hypo.getInt("c_no") + " order by c_no desc";
ResultSet rs_hypo_cs = stmt.executeQuery(sql_hypo_cs);
while(rs_hypo_cs.next()){
%>
<font color="#<%=rs_hypo_cs.getString("c_cs_color")%>">■</font>
<%}
rs_hypo_cs.close();
%>
<%}%>
</td></tr>
</table>
</div>
<div style="width:100%;height:5px"></div>
<%
}
rs_hypo.close();
%>
</div>
<%}%>
</td></tr>
</table>
</td>
<%}%>
</table>
<div class="tab tab-border" style="padding-top:20px">
<ul class="nav nav-tabs">
<li class="active"><a href="#info01" data-toggle="tab"><img src="/images/icon/exp.png" height="20px"> Hypothesis</a></li>
<li><a href="#info02" data-toggle="tab"><img src="/images/icon/mic.png" height="20px"> Interview</a></a></li>
<li><a href="#info03" data-toggle="tab"><img src="/images/icon/comment.png" height="18px"> Comment</a></a></li>
</ul>
<div class="tab-content white-bg">
<div class="tab-pane fade in active" id="info01">
<table width="100%" cellpadding=0 cellspacing=0>
<tr><td align=right style="padding:10px">
<a href="#none" onclick="fnExcelReport('hypo_data','hypothesis_data_for_<%=hy_title[c_channel]%>.xls')" title="엑셀저장"><img src="/images/icon/excel.gif" alt="" height="20px"></a>
</td></tr></table>
<table width=100% cellspacing=2 cellpadding=0 bgcolor=ffffff id="hypo_data">
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ededed>
<td height="30px" align=center style="padding:3px">
Title
</td><td width="100px" align=center style="padding:3px">
Channel
</td><td width="100px" align=center style="padding:3px">
Validation
</td><td width="160px" align=center style="padding:3px">
Customer Segment
</td><td width="80px" align=center style="padding:3px">
Insert Date
</td><td width="80px" align=center style="padding:3px">
Period
</td>
</tr>
<%
String sql_hypo = " select a.*, b.c_name as writer_name ";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 2count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 2 and d.c_date <= '"+ call_date + " 23:59:59" +"') as 2count";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 1count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 1 and d.c_date <= '"+ call_date + " 23:59:59" +"') as 1count";
sql_hypo = sql_hypo + ", (select count(c.c_no) as 0count from tbl_interview_point c inner join tbl_interview d on d.c_no = c.c_interview_no and d.c_use = 0 where c.c_hypo_no = a.c_no and c_point= 0 and d.c_date <= '"+ call_date + " 23:59:59" +"') as 0count";
sql_hypo = sql_hypo + ", (select max(e.c_no) from tbl_hypo_history e where e.c_hypo_no = a.c_no and e.c_date <= '"+ call_date + " 23:59:59" +"' ) as c_last_now ";
sql_hypo = sql_hypo + " from tbl_hypo a ";
sql_hypo = sql_hypo + " inner join tbl_member b on b.c_no = a.c_member_no ";
sql_hypo = sql_hypo + " where a.c_channel = "+ c_channel +" and (a.c_use = 0 or ( a.c_use = 1 and a.c_use_date > '"+ call_date + " 23:59:59" +"' ) ) and a.c_team_no = "+ c_team +" and a.c_date <= '"+ call_date + " 23:59:59" +"' ";
sql_hypo = sql_hypo + " order by a.c_no desc";
ResultSet rs_hypo = stmt2.executeQuery(sql_hypo);
while(rs_hypo.next()){
%>
<%
int now_call = 0;
String sql_hypo_history = " select c_now from tbl_hypo_history where c_no = " + rs_hypo.getInt("c_last_now") + " ";
ResultSet rs_hypo_history = stmt.executeQuery(sql_hypo_history);
if(rs_hypo_history.next()){
now_call = rs_hypo_history.getInt("c_now");
}
rs_hypo_history.close();
%>
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ffffff>
<td height="30px" align=left style="padding:3px;padding-left:20px">
<a href="hypo/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_no")%>"><%=rs_hypo.getString("c_title")%></a>
</td><td width="200px" align=center style="padding:3px">
<%
int c_chan_no = rs_hypo.getInt("c_channel");
%>
<%=hy_title[c_chan_no]%>
</td><td width="100px" align=center style="padding:3px">
<%if(now_call == 0){%>
<font color="#12122">Ing..</font>
<%}%>
<%if(now_call == 1){%>
<font color="Blue">Validated</font>
<%}%>
<%if(now_call == 2){%>
<font color="Red">Invalidated</font>
<%}%>
</td><td width="160px" align=center style="padding:3px">
<%
if(rs_hypo.getInt("c_channel") == 5 ){
%>
<font color="#<%=rs_hypo.getString("c_color")%>">■</font>
<%
}else{%>
<%
String sql_hypo_cs = " select c_cs_color from tbl_hypo_cs where c_hypo_no = " + rs_hypo.getInt("c_no") + " order by c_no desc";
ResultSet rs_hypo_cs = stmt.executeQuery(sql_hypo_cs);
while(rs_hypo_cs.next()){
%>
<font color="#<%=rs_hypo_cs.getString("c_cs_color")%>">■</font>
<%}
rs_hypo_cs.close();
%>
<%}%>
</td><td width="80px" align=center style="padding:3px">
<%=rs_hypo.getString("c_date").substring(0,10)%>
</td><td width="80px" align=center style="padding:3px">
<%for (int i = 1; i < c_p_p + 1; i++){%>
<%if(Integer.parseInt(a_w_s[i].replaceAll("-","")) <= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) && Integer.parseInt(a_w_e[i].replaceAll("-","")) >= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) ){
%>
<%if(today_period == i){%>
<font color=red><b>
<%}%>
<%=i%>P
<%
}%>
<%}%>
</td>
</tr>
<%}
rs_hypo.close();
%>
</table>
</div>
<div class="tab-pane fade in " id="info02">
<table width="100%" cellpadding=0 cellspacing=0>
<tr><td align=right style="padding:10px">
<a href="#none" onclick="fnExcelReport('interview_data','interview_data_for_<%=hy_title[c_channel]%>.xls')" title="엑셀저장"><img src="/images/icon/excel.gif" alt="" height="20px"></a>
</td></tr></table>
<table width=100% cellspacing=2 cellpadding=0 bgcolor=ffffff id="interview_data">
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ededed>
<td height="30px" align=center style="padding:3px">
Whom
</td><td width="100px" align=center style="padding:3px">
Type
</td><td width="300px" align=center style="padding:3px">
Interview Date
</td><td width="200px" align=center style="padding:3px">
Hypothesiis
</td><td width="80px" align=center style="padding:3px">
Period
</td>
</tr>
<%
sql_hypo = " select a.* , c.c_title as hypo_title, c.c_no as hypo_no ";
sql_hypo = sql_hypo + " from tbl_interview a ";
sql_hypo = sql_hypo + " inner join tbl_interview_point b on b.c_interview_no = a.c_no ";
sql_hypo = sql_hypo + " inner join tbl_hypo c on c.c_no = b.c_hypo_no and c.c_channel = " + c_channel + " ";
sql_hypo = sql_hypo + " where a.c_use = 0 and a.c_team_no = "+ c_team +" and a.c_date <= '"+ call_date + " 23:59:59" +"' ";
sql_hypo = sql_hypo + " order by a.c_no desc";
rs_hypo = stmt2.executeQuery(sql_hypo);
while(rs_hypo.next()){
%>
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ffffff>
<td height="30px" align=left style="padding:3px;padding-left:20px">
<a href="interview/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_no")%>" title="Interview정보보기">
<%
String sql_hypo_history = " select * from tbl_interview_target where c_interview_no = " + rs_hypo.getInt("c_no") + " ";
ResultSet rs_hypo_history = stmt.executeQuery(sql_hypo_history);
int top = 0;
while(rs_hypo_history.next()){
top = top + 1;
%>
<%if(top > 1){%>
&nbsp;/&nbsp;
<%}%>
<%=rs_hypo_history.getString("c_company")%>, <%=rs_hypo_history.getString("c_position")%>, <%=rs_hypo_history.getString("c_name")%>
<%
}
rs_hypo_history.close();
%>
</a>
</td><td width="200px" align=center style="padding:3px">
<%if(rs_hypo.getInt("c_type") == 0){%>
In Person
<%}%>
<%if(rs_hypo.getInt("c_type") == 1){%>
Phone
<%}%>
<%if(rs_hypo.getInt("c_type") == 2){%>
Email
<%}%>
<%if(rs_hypo.getInt("c_type") == 3){%>
Video Chat
<%}%>
</td><td width="80px" align=center style="padding:3px">
<%=rs_hypo.getString("c_interview_date").substring(0,10)%>
</td><td width="80px" align=center style="padding:3px">
<a href="hypo/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("hypo_no")%>" title="Hypothesis정보보기">
<%=rs_hypo.getString("hypo_title")%>
</a>
</td><td width="80px" align=center style="padding:3px">
<%for (int i = 1; i < c_p_p + 1; i++){%>
<%if(Integer.parseInt(a_w_s[i].replaceAll("-","")) <= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) && Integer.parseInt(a_w_e[i].replaceAll("-","")) >= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) ){
%>
<%if(today_period == i){%>
<font color=red><b>
<%}%>
<%=i%>P
<%
}%>
<%}%>
</td>
</tr>
<%}
rs_hypo.close();
%>
</table>
</div>
<div class="tab-pane fade in " id="info03">
<table width="100%" cellpadding=0 cellspacing=0>
<tr><td align=right style="padding:10px">
<a href="#none" onclick="fnExcelReport('comment_data','comment_data_for_<%=hy_title[c_channel]%>.xls')" title="엑셀저장"><img src="/images/icon/excel.gif" alt="" height="20px"></a>
</td></tr></table>
<table width=100% cellspacing=2 cellpadding=0 bgcolor=ffffff id="comment_data">
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ededed>
<td height="30px" align=center style="padding:3px">
Content
</td><td width="100px" align=center style="padding:3px">
Target Type
</td><td width="100px" align=center style="padding:3px">
Writer Type
</td><td width="100px" align=center style="padding:3px">
Insert Date
</td><td width="80px" align=center style="padding:3px">
Period
</td>
</tr>
<%
sql_hypo = " select a.* ";
sql_hypo = sql_hypo + " from tbl_comment a ";
sql_hypo = sql_hypo + " inner join tbl_hypo b on b.c_no = a.c_relation and b.c_channel = "+ c_channel +" ";
sql_hypo = sql_hypo + " where a.c_type = 0 and a.c_use = 0 and a.c_team_no = "+ c_team +" and a.c_date <= '"+ call_date + " 23:59:59" +"' ";
sql_hypo = sql_hypo + " order by a.c_no desc";
rs_hypo = stmt2.executeQuery(sql_hypo);
while(rs_hypo.next()){
%>
<tr style="border-bottom: 1px solid #cdcdcd;" bgcolor=ffffff>
<td height="30px" align=left style="padding:3px;padding-left:20px">
<%if(rs_hypo.getInt("c_type") == 0){%>
<a href="hypo/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_relation")%>" title="관련 가설로 바로가기">
<%}%>
<%if(rs_hypo.getInt("c_type") == 1){%>
<a href="interview/view.jsp?<%=para_t%>&c_team=<%=c_team%>&c_no=<%=rs_hypo.getInt("c_relation")%>" title="관련 인터뷰로 바로가기">
<%}%>
<%=rs_hypo.getString("c_content")%>
</a>
</td><td width="200px" align=center style="padding:3px">
<%if(rs_hypo.getInt("c_type") == 0){%>
Hypothesis
<%}%>
<%if(rs_hypo.getInt("c_type") == 1){%>
Interview
<%}%>
</td><td width="80px" align=center style="padding:3px">
<%if(rs_hypo.getInt("c_member_type") == 0){%>
Member
<%}%>
<%if(rs_hypo.getInt("c_member_type") == 1){%>
Instructor
<%}%>
<%if(rs_hypo.getInt("c_member_type") == 2){%>
Mentor
<%}%>
</td><td width="80px" align=center style="padding:3px">
<%=rs_hypo.getString("c_date").substring(0,10)%>
</td><td width="80px" align=center style="padding:3px">
<%for (int i = 1; i < c_p_p + 1; i++){%>
<%if(Integer.parseInt(a_w_s[i].replaceAll("-","")) <= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) && Integer.parseInt(a_w_e[i].replaceAll("-","")) >= Integer.parseInt(rs_hypo.getString("c_date").substring(0,10).replaceAll("-","")) ){
%>
<%if(today_period == i){%>
<font color=red><b>
<%}%>
<%=i%>P
<%
}%>
<%}%>
</td>
</tr>
<%}
rs_hypo.close();
%>
</table>
</div>
</div>
</div>
<br />
<div class="text-center">
<a href="list.jsp?<%=para_t%>&c_team=<%=c_team%>" style="width: 150px; line-height: 40px; text-align: center;display: inline-block; background: #787878; border: 1px solid #ffffff;border-radius: 20px; color: #ffffff;font-weight:400;font-size: 13px;"> BMC로 이동</a>
</div>
<br />
<br />
<%@include file="/cms_for_bcb/show_bottom.jsp"%>
<%@include file="/include/bottom.jsp"%>
<%@include file="/include/include_b.jsp"%>