Commit 03c803fe by peema_phongam

report excel candidate exam

parent b333dd1a
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<%@ page import="com.csc.library.databean.Simmappointmentwithgson" %> <%@ page import="com.csc.library.databean.Simmappointmentwithgson" %>
<%@ page import="com.csc.library.databean.Simmapplicanthisotherwithgson" %> <%@ page import="com.csc.library.databean.Simmapplicanthisotherwithgson" %>
<%@ page import="com.csc.library.utilities.gsonmapping.*" %> <%@ page import="com.csc.library.utilities.gsonmapping.*" %>
<%@ page import="org.json.JSONArray" %>
<% <%
CheckNull chk = new CheckNull(); CheckNull chk = new CheckNull();
CscCalendar c = new CscCalendar(); CscCalendar c = new CscCalendar();
...@@ -84,16 +85,50 @@ ...@@ -84,16 +85,50 @@
<script src="../JS/bootstrap.min.js"></script> <script src="../JS/bootstrap.min.js"></script>
<script type="text/javascript" src="../JS/angular-1.3.15/angular.js"></script> <script type="text/javascript" src="../JS/angular-1.3.15/angular.js"></script>
<script type="text/javascript" src="../JS/ANGULAR/SCREEN_ANGULAR.js"></script> <script type="text/javascript" src="../JS/ANGULAR/SCREEN_ANGULAR.js"></script>
<script type='text/javascript' src='../EXAM/JS/CLASS/Question.Class.js'></script>
<script language="javascript">setLang('<%=up.get("lang")%>');</script> <script language="javascript">setLang('<%=up.get("lang")%>');</script>
<script language="JavaScript" type="text/JavaScript"> <script language="JavaScript" type="text/JavaScript">
let dataReport = ""
let clsQuestion = new Question()
let router = []
let resultPIT = {
dominance : 0,
assertiveness : 0,
needForAchievement : 0,
orderliness : 0,
autonomy : 0,
needForAffiliation : 0,
nurturance :0,
endurance : 0,
needForRecognition : 0,
initiativeness : 0,
sociability : 0,
responsibility : 0,
honesty : 0,
positiveAttitude :0,
selfControl : 0,
consistency : 0
}
function GoExport(){ function GoExport(){
console.log($('#tableReport').html())
// cscForm.action = "FillFormApplicant.jsp"
// cscForm.__candidateid.value = candidateid
// cscForm.target = "_blank"
// cscForm.submit()
with(document.cscform){ with(document.cscform){
// alert(__filter.value); action = "RRC030_EXP.jsp"
var param = "RRC030_EXP.jsp?__filter="+__filter.value; target = "_blank"
window.open(param); __objExport.value = $('#tableReport').html()
submit()
// var param = "RRC030_EXP.jsp?__filter="+__filter.value;
// window.open(param);
} }
} }
...@@ -187,6 +222,7 @@ ...@@ -187,6 +222,7 @@
<input type="hidden" name="__isprocess" value="0"> <input type="hidden" name="__isprocess" value="0">
<input type="hidden" name="__filter" value="<%=filter%>"> <input type="hidden" name="__filter" value="<%=filter%>">
<input type="hidden" name="__calendar" value=""> <input type="hidden" name="__calendar" value="">
<input type="hidden" name="__objExport" value="">
<script language="javascript">getInputFormatDate()</script> <script language="javascript">getInputFormatDate()</script>
<br> <br>
...@@ -271,12 +307,15 @@ ...@@ -271,12 +307,15 @@
<% <%
if(isprocess.equals("1")){ if(isprocess.equals("1")){
%> %>
<table class="maxsize table table-bordered " border="1" cellpadding="0" cellspacing="1" cols=14 bgcolor="#CCCCCC"> <div id="tableReport">
<table class="maxsize table table-bordered " border="1" cellpadding="0" cellspacing="1" cols=15 >
<tr> <tr>
<td class="row1 center" colspan='3'></td> <td class="row1 center" colspan='3'></td>
<td class="row1 center" colspan='16'><%=up.get("lang").equals("tha")?"Personality Inventory Test":"Personality Inventory Test"%></td> <td class="row1 center" colspan='16'><%=up.get("lang").equals("tha")?"Personality Inventory Test":"Personality Inventory Test"%></td>
<td class="row1 center" >Abstract Reasoning</td> <td class="row1 center" >Abstract Reasoning</td>
<td class="row1 center" >Advaneed English</td> <td class="row1 center" >Advaneed English</td>
<td class="row1 center" >ข้อสอบคณิตศาสตร์</td>
</tr> </tr>
<tr> <tr>
<td class="row1 center"><%=up.get("lang").equals("tha")?"ชื่อ-นามสกุล":"Name-Surname"%></td> <td class="row1 center"><%=up.get("lang").equals("tha")?"ชื่อ-นามสกุล":"Name-Surname"%></td>
...@@ -300,7 +339,7 @@ ...@@ -300,7 +339,7 @@
<td class="row1 center"><%=up.get("lang").equals("tha")?"Consistency":"Consistency"%></td> <td class="row1 center"><%=up.get("lang").equals("tha")?"Consistency":"Consistency"%></td>
<td class="row1 center"><%=up.get("lang").equals("tha")?"Result":"Result"%></td> <td class="row1 center"><%=up.get("lang").equals("tha")?"Result":"Result"%></td>
<td class="row1 center"><%=up.get("lang").equals("tha")?"Result":"Result"%></td> <td class="row1 center"><%=up.get("lang").equals("tha")?"Result":"Result"%></td>
<td class="row1 center"><%=up.get("lang").equals("tha")?"Result":"Result"%></td>
</tr> </tr>
<% <%
// >>>>>>>>>>>> Current Zone <<<<<<<<<<<< // >>>>>>>>>>>> Current Zone <<<<<<<<<<<<
...@@ -368,6 +407,7 @@ ...@@ -368,6 +407,7 @@
inqpre.refresh(); inqpre.refresh();
inqpre.next(); inqpre.next();
inqsourcejob.setFilter("sourcejobid = '"+simmcandidatewithgson.mcandidateOther.sourcejob+"'"); inqsourcejob.setFilter("sourcejobid = '"+simmcandidatewithgson.mcandidateOther.sourcejob+"'");
inqsourcejob.refresh(); inqsourcejob.refresh();
inqsourcejob.next(); inqsourcejob.next();
...@@ -411,36 +451,70 @@ ...@@ -411,36 +451,70 @@
Fullname = inqpre.getString("edesc")+ simmcandidatewithgson.mcandidatePersonal.fname.eng+" "+simmcandidatewithgson.mcandidatePersonal.lname.eng; Fullname = inqpre.getString("edesc")+ simmcandidatewithgson.mcandidatePersonal.fname.eng+" "+simmcandidatewithgson.mcandidatePersonal.lname.eng;
} }
JSONArray router = new JSONArray(simmcandidatewithgson.mcandidateJobrouter.jobrouter);
%> %>
<tr> <tr>
<td><%=Fullname%></td> <td><%=Fullname%></td>
<td><%=up.get("lang").equals("tha")?inqcan.getString("mjobcode","tdesc"):inqcan.getString("mjobcode","tdesc")%></td> <td><%=up.get("lang").equals("tha")?inqcan.getString("mjobcode","tdesc"):inqcan.getString("mjobcode","tdesc")%></td>
<td><%=inqcan.getString("applicantdate")%></td> <td><%=inqcan.getString("applicantdate")%></td>
<td>1</td> <td id="dominance<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="assertiveness<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="needForAchievement<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="orderliness<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="autonomy<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="needForAffiliation<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="nurturance<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="endurance<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="needForRecognition<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="initiativeness<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="sociability<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="responsibility<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="honesty<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="positiveAttitude<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="selfControl<%=inqcan.recNo()%>"></td>
<td>1</td> <td id="consistency<%=inqcan.recNo()%>"></td>
<td>result</td> <td id="abstract<%=inqcan.recNo()%>"></td>
<td>result</td> <td id="english<%=inqcan.recNo()%>"></td>
<td id="math<%=inqcan.recNo()%>"></td>
</tr> </tr>
<script>
router = <%=router%>
router.forEach(($item, $index) => {
if ($item.examdata) {
let isDHASPIT = $item.examdata.topic.tha.includes("แบบสำรวจบุคลิกภาพ") || $item.examdata.topic.eng.includes("แบบสำรวจบุคลิกภาพ")
let isAbstract = $item.examdata.topic.tha.includes("แบบสำรวจบุคลิกภาพ") || $item.examdata.topic.eng.includes("ความถนัดเชิงเหตุผลนามธรรม")
let isMath = $item.examdata.topic.tha.includes("คณิตศาสตร์") || $item.examdata.topic.eng.includes("คณิตศาสตร์")
let isEnglish = $item.examdata.topic.tha.toUpperCase().includes("ENGLISH") || $item.examdata.topic.eng.toUpperCase().includes("ENGLISH")
if (isDHASPIT) {
resultPIT = clsQuestion.getDHASPIT($item)
for (let key in resultPIT) {
if (resultPIT.hasOwnProperty(key)) {
$('#'+key+<%=inqcan.recNo()%>).text(resultPIT[key])
}
}
} else if (isAbstract) {
let abstractScore = clsQuestion.getRealScore($item.question)
$('#abstract'+<%=inqcan.recNo()%>).text(abstractScore)
} else if (isEnglish) {
let englishScore = clsQuestion.getRealScore($item.question)
$('#english'+<%=inqcan.recNo()%>).text(englishScore)
} else if (isMath) {
let mathScore = clsQuestion.getRealScore($item.question)
$('#math'+<%=inqcan.recNo()%>).text(mathScore)
}
}
})
</script>
<% <%
} }
%> %>
</table> </table>
</div>
<% <%
} }
%> %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment