Commit f54952ba authored by nsawalakhe's avatar nsawalakhe

Added logic and sql changes


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104451 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ec247633
...@@ -154,7 +154,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -154,7 +154,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
"FROM dbo.survey_master WHERE survey_code IN ( SELECT survey_code FROM dbo.survey_templ_det " + "FROM dbo.survey_master WHERE survey_code IN ( SELECT survey_code FROM dbo.survey_templ_det " +
"WHERE survey_templ='"+eventCode+"' ))AS perce from ( SELECT srd.TRAN_ID, emp.code, " + "WHERE survey_templ='"+eventCode+"' ))AS perce from ( SELECT srd.TRAN_ID, emp.code, " +
"emp.firstname +' '+ emp.lastname AS PARTICIPANTS_NAME, case when ISNUMERIC(RESULT)=1 " + "emp.firstname +' '+ emp.lastname AS PARTICIPANTS_NAME, case when ISNUMERIC(RESULT)=1 " +
"then (srd.result ) else 0 end as result, COUNT(DISTINCT srd.TRAN_ID) AS count_m " + "then (srd.result ) else 0 end as result, srd.TRAN_ID AS count_m " +
"FROM dbo.SURVEY_CONFIG sc INNER JOIN ( SELECT * FROM dbo.survey_config_appl " + "FROM dbo.SURVEY_CONFIG sc INNER JOIN ( SELECT * FROM dbo.survey_config_appl " +
"WHERE appl_entity='E' ) sca ON sca.survey_id=sc.SURVEY_ID " + "WHERE appl_entity='E' ) sca ON sca.survey_id=sc.SURVEY_ID " +
"INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID " + "INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID " +
...@@ -167,7 +167,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -167,7 +167,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
"FROM dbo.SCOPE_VALUE ) t CROSS APPLY x.nodes('/XMLRoot/RowData')m(n) ) A ON a.code =sv.scope_code " + "FROM dbo.SCOPE_VALUE ) t CROSS APPLY x.nodes('/XMLRoot/RowData')m(n) ) A ON a.code =sv.scope_code " +
"AND A.EMP_CODE=sra.ENTITY_CODE INNER JOIN dbo.employee emp ON emp.code=A.EMP_CODE " + "AND A.EMP_CODE=sra.ENTITY_CODE INNER JOIN dbo.employee emp ON emp.code=A.EMP_CODE " +
"WHERE SURVEY_TEMPL='"+eventCode+"' " + "WHERE SURVEY_TEMPL='"+eventCode+"' " +
"GROUP BY emp.code, emp.firstname +' '+ emp.lastname, sca.scope_code,srd.result,srd.TRAN_ID ) b " + /*"GROUP BY emp.code, emp.firstname +' '+ emp.lastname, sca.scope_code,srd.result,srd.TRAN_ID */") b " +
"group by code, PARTICIPANTS_NAME ) a ORDER BY rank "; "group by code, PARTICIPANTS_NAME ) a ORDER BY rank ";
...@@ -197,7 +197,6 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -197,7 +197,6 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
while (rs.next()) while (rs.next())
{ {
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("participants_code",checkNull (rs.getString("CODE"))); rowData.put("participants_code",checkNull (rs.getString("CODE")));
rowData.put("participants_name",checkNull (rs.getString("PARTICIPANTS_NAME"))); rowData.put("participants_name",checkNull (rs.getString("PARTICIPANTS_NAME")));
rowData.put("no_of_evaluation",checkNull (rs.getString("NO_OF_EVALUATION"))); rowData.put("no_of_evaluation",checkNull (rs.getString("NO_OF_EVALUATION")));
......
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