Commit b161223f authored by vvengurlekar's avatar vvengurlekar

Added sql changes and logic change for 4th and 5th level for live events dashboard


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105363 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4110fd97
...@@ -299,18 +299,72 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -299,18 +299,72 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
{ {
System.out.println(" Inside LiveEventDetails for getParticipentEventDetail Data Soruc Name ="+dataSourceName+ "==== participentCode :"+participentCode+"eventCode==="+eventCode); System.out.println(" Inside LiveEventDetails for getParticipentEventDetail Data Soruc Name ="+dataSourceName+ "==== participentCode :"+participentCode+"eventCode==="+eventCode);
sql="WITH as_det1 (code,prd_name,mgr_name,mgr_code,perc,report,resultcnt,total) AS (SELECT CODE, PRD_NAME, mgr_name, mgr_code, PERC, REPORT, RESULTCNT, TOTAL FROM (SELECT DET_PRD.CODE, DET_PRD.NAME , DET_PRD.mgr_name, DET_PRD.EMP_CODE AS mgr_code, DET_PRD.PRD_NAME, RESULT, TOTAL, Str((RESULT * 100.0/TOTAL),4,1) AS PERC, 'Marks' AS REPORT, (RESULT)AS RESULTCNT FROM (SELECT e.CODE, SUM(SUR.RESULT) TOTAL FROM dbo.employee e INNER JOIN dbo.REGION r ON e.regionid = r.id INNER JOIN (SELECT APP.ENTITY_CODE EMP_CODE, SRE.EMP_CODE MGR, SUM(CAST(SRD.result AS INT)) RESULT, APPR.ENTITY_CODE PRD_CODE, APPR.ENTITY_DESCR PRD_DESC, SR.TRAN_ID FROM dbo.survey_result_EMP SRE INNER JOIN dbo.survey_result SR ON SRE.TRAN_ID = SR.TRAN_ID__FORM INNER JOIN ( SELECT code, a, b, PARTICIPANTS_NAME, sum(result) as result, count_m FROM ( SELECT emp.code, srd.TRAN_ID AS a, sra.TRAN_ID AS b, emp.firstname +' '+ emp.lastname AS PARTICIPANTS_NAME , case when ISNUMERIC(srd.result)=1 then (srd.result ) else 0 end AS result, COUNT(DISTINCT srd.TRAN_ID) AS count_m 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 INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID INNER JOIN dbo.SURVEY_RESULT sr ON sr.tran_id__form=sf.tran_id INNER JOIN dbo.SURVEY_RESULT_DET srd ON srd.TRAN_ID=sr.TRAN_ID LEFT JOIN ( SELECT * FROM dbo.survey_result_appl WHERE appl_entity='E' ) sra ON sra.TRAN_ID=srd.tran_id INNER JOIN dbo.SCOPE_VALUE sv ON sv.scope_code=sca.scope_code LEFT JOIN (SELECT SCOPE_CODE AS CODE, LTRIM(RTRIM(m.n.value('.[1]','varchar(8000)'))) AS EMP_CODE FROM (SELECT SCOPE_CODE, CAST('<XMLRoot><RowData>' + REPLACE( SCOPE_VAL_DESCR,',','</RowData><RowData>') + '</RowData></XMLRoot>' AS XML) AS x 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 " + sql="WITH as_det1 (code,prd_name,mgr_name,mgr_code,perc,report,resultcnt,total, NEW_TRAN_ID) AS " +
"LEFT JOIN dbo.employee emp ON emp.code =A.EMP_CODE " + "(SELECT CODE, PRD_NAME, mgr_name, mgr_code, PERC, REPORT, RESULTCNT, TOTAL, NEW_TRAN_ID FROM " +
"(SELECT DET_PRD.CODE, DET_PRD.b as NEW_TRAN_ID, DET_PRD.NAME , DET_PRD.mgr_name, DET_PRD.EMP_CODE AS mgr_code, " +
"DET_PRD.PRD_NAME, RESULT, TOTAL, Str((RESULT * 100.0/TOTAL),4,1) AS PERC, 'Marks' AS REPORT," +
" (RESULT)AS RESULTCNT FROM (SELECT e.CODE, SUM(SUR.RESULT) TOTAL FROM dbo.employee e " +
"INNER JOIN dbo.REGION r ON e.regionid = r.id INNER JOIN (SELECT APP.ENTITY_CODE EMP_CODE," +
" SRE.EMP_CODE MGR, SUM(CAST(SRD.result AS INT)) RESULT, APPR.ENTITY_CODE PRD_CODE," +
" APPR.ENTITY_DESCR PRD_DESC, SR.TRAN_ID FROM dbo.survey_result_EMP SRE INNER JOIN " +
"dbo.survey_result SR ON SRE.TRAN_ID = SR.TRAN_ID__FORM INNER JOIN ( " +
"SELECT code, a, b, PARTICIPANTS_NAME, sum(result) as result, count_m FROM ( SELECT emp.code, " +
"srd.TRAN_ID AS a, sra.TRAN_ID AS b, emp.firstname +' '+ emp.lastname AS PARTICIPANTS_NAME , " +
"case when ISNUMERIC(srd.result)=1 then (srd.result ) else 0 end AS result," +
" COUNT(DISTINCT srd.TRAN_ID) AS count_m 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 INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID" +
" INNER JOIN dbo.SURVEY_RESULT sr ON sr.tran_id__form=sf.tran_id INNER JOIN " +
"dbo.SURVEY_RESULT_DET srd ON srd.TRAN_ID=sr.TRAN_ID LEFT JOIN ( SELECT * " +
"FROM dbo.survey_result_appl WHERE appl_entity='E' ) sra ON sra.TRAN_ID=srd.tran_id INNER JOIN" +
" dbo.SCOPE_VALUE sv ON sv.scope_code=sca.scope_code LEFT JOIN " +
"(SELECT SCOPE_CODE AS CODE, LTRIM(RTRIM(m.n.value('.[1]','varchar(8000)'))) AS EMP_CODE " +
"FROM (SELECT SCOPE_CODE, CAST('<XMLRoot><RowData>' + REPLACE( SCOPE_VAL_DESCR,',','</RowData>" +
"<RowData>') + '</RowData></XMLRoot>' AS XML) AS x 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 LEFT JOIN dbo.employee emp ON emp.code =A.EMP_CODE " +
"WHERE SURVEY_TEMPL='"+eventCode+"' " + "WHERE SURVEY_TEMPL='"+eventCode+"' " +
"GROUP BY srd.TRAN_ID, sra.TRAN_ID, emp.code,srd.result, emp.firstname +' '+ emp.lastname, sca.scope_code ) a group by code, a, b, PARTICIPANTS_NAME, count_m ) SRD ON SR.TRAN_ID = SRD.b INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE APPL_ENTITY = 'E' ) APP ON SRD.b = APP.TRAN_ID INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE APPL_ENTITY = 'I' ) APPR ON SRD.b = APPR.TRAN_ID GROUP BY APP.ENTITY_CODE, SRE.EMP_CODE, APPR.ENTITY_CODE, APPR.ENTITY_DESCR, SR.TRAN_ID ) SUR ON e.code = SUR.EMP_CODE " + "GROUP BY srd.TRAN_ID, sra.TRAN_ID, emp.code,srd.result, emp.firstname +' '+ emp.lastname, " +
"sca.scope_code ) a group by code, a, b, PARTICIPANTS_NAME, count_m ) SRD ON" +
" SR.TRAN_ID = SRD.b INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE APPL_ENTITY = 'E' )" +
" APP ON SRD.b = APP.TRAN_ID INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE" +
" APPL_ENTITY = 'I' ) APPR ON SRD.b = APPR.TRAN_ID GROUP BY APP.ENTITY_CODE, SRE.EMP_CODE, " +
"APPR.ENTITY_CODE, APPR.ENTITY_DESCR, SR.TRAN_ID ) SUR ON e.code = SUR.EMP_CODE " +
"WHERE e.code = '"+participentCode+"' " + "WHERE e.code = '"+participentCode+"' " +
"GROUP BY e.CODE ) HDR INNER JOIN ( SELECT (e.FIRSTNAME +' '+ e.LASTNAME) NAME, APPR.ENTITY_DESCR AS PRD_NAME , SUM(CAST(SRD.result AS INT)) RESULT , (SELECT firstname+ +''+lastname FROM dbo.employee WHERE emp_code= SRE.emp_code ) AS mgr_name, SRE.emp_code, e.code, SRD.b FROM dbo.survey_result_EMP SRE INNER JOIN dbo.survey_result SR ON SRE.TRAN_ID = SR.TRAN_ID__FORM INNER JOIN (SELECT code, a, b, SURVEY_CODE, PARTICIPANTS_NAME, result, count_m FROM ( select code, a, b,SURVEY_CODE, PARTICIPANTS_NAME, sum(result) as result, count_m from (SELECT emp.code, srd.TRAN_ID AS a, sra.TRAN_ID AS b, srd.SURVEY_CODE, emp.firstname +' '+ emp.lastname AS PARTICIPANTS_NAME, case when ISNUMERIC(srd.RESULT)=1 then (srd.result ) else 0 end AS result , COUNT(DISTINCT srd.TRAN_ID) AS count_m 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 INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID INNER JOIN dbo.SURVEY_RESULT sr ON sr.tran_id__form=sf.tran_id INNER JOIN dbo.SURVEY_RESULT_DET srd ON srd.TRAN_ID=sr.TRAN_ID LEFT JOIN ( SELECT * FROM dbo.survey_result_appl WHERE appl_entity='E' ) sra ON sra.TRAN_ID=srd.tran_id INNER JOIN dbo.SCOPE_VALUE sv ON sv.scope_code=sca.scope_code LEFT JOIN (SELECT SCOPE_CODE AS CODE, LTRIM(RTRIM(m.n.value('.[1]','varchar(8000)'))) AS EMP_CODE FROM (SELECT SCOPE_CODE, CAST('<XMLRoot><RowData>' + REPLACE( SCOPE_VAL_DESCR,',','</RowData><RowData>') + '</RowData></XMLRoot>' AS XML) AS x 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 LEFT JOIN dbo.employee emp ON emp.code =A.EMP_CODE " + "GROUP BY e.CODE ) HDR INNER JOIN ( SELECT (e.FIRSTNAME +' '+ e.LASTNAME) NAME, APPR.ENTITY_DESCR " +
"AS PRD_NAME , SUM(CAST(SRD.result AS INT)) RESULT , (SELECT firstname+ +''+lastname FROM " +
"dbo.employee WHERE emp_code= SRE.emp_code ) AS mgr_name, SRE.emp_code, e.code, SRD.b FROM " +
"dbo.survey_result_EMP SRE INNER JOIN dbo.survey_result SR ON SRE.TRAN_ID = SR.TRAN_ID__FORM " +
"INNER JOIN (SELECT code, a, b, SURVEY_CODE, PARTICIPANTS_NAME, result, count_m FROM ( " +
"select code, a, b,SURVEY_CODE, PARTICIPANTS_NAME, sum(result) as result, count_m from (" +
"SELECT emp.code, srd.TRAN_ID AS a, sra.TRAN_ID AS b, srd.SURVEY_CODE, emp.firstname +' '+ " +
"emp.lastname AS PARTICIPANTS_NAME, case when ISNUMERIC(srd.RESULT)=1 then (srd.result ) else 0 " +
"end AS result , COUNT(DISTINCT srd.TRAN_ID) AS count_m 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 " +
"INNER JOIN dbo.SURVEY_FORM sf ON sf.SURVEY_ID=sc.SURVEY_ID INNER JOIN dbo.SURVEY_RESULT sr " +
"ON sr.tran_id__form=sf.tran_id INNER JOIN dbo.SURVEY_RESULT_DET srd ON srd.TRAN_ID=sr.TRAN_ID " +
"LEFT JOIN ( SELECT * FROM dbo.survey_result_appl WHERE appl_entity='E' ) sra ON " +
"sra.TRAN_ID=srd.tran_id INNER JOIN dbo.SCOPE_VALUE sv ON sv.scope_code=sca.scope_code " +
"LEFT JOIN (SELECT SCOPE_CODE AS CODE, LTRIM(RTRIM(m.n.value('.[1]','varchar(8000)'))) AS " +
"EMP_CODE FROM (SELECT SCOPE_CODE, CAST('<XMLRoot><RowData>' + REPLACE( SCOPE_VAL_DESCR,',','</RowData><RowData>') + '</RowData></XMLRoot>' AS XML) AS x 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 LEFT JOIN dbo.employee emp ON emp.code" +
" =A.EMP_CODE " +
"WHERE SURVEY_TEMPL='"+eventCode+"' " + "WHERE SURVEY_TEMPL='"+eventCode+"' " +
"GROUP BY srd.TRAN_ID, sra.TRAN_ID, srd.SURVEY_CODE, emp.code,srd.result, emp.firstname +' '+ emp.lastname, sca.scope_code ) b group by code, a, b,SURVEY_CODE, PARTICIPANTS_NAME, count_m ) a ) SRD ON SR.TRAN_ID = SRD.b INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE APPL_ENTITY = 'E' ) APP ON SRD.b = APP.TRAN_ID INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE APPL_ENTITY = 'I' ) APPR ON SRD.b = APPR.TRAN_ID INNER JOIN dbo.employee e ON APP.ENTITY_CODE = e.code INNER JOIN dbo.survey_master sm ON SRD.SURVEY_CODE = sm.SURVEY_CODE " + "GROUP BY srd.TRAN_ID, sra.TRAN_ID, srd.SURVEY_CODE, emp.code,srd.result, emp.firstname +' '+ " +
"emp.lastname, sca.scope_code ) b group by code, a, b,SURVEY_CODE, PARTICIPANTS_NAME, count_m ) a" +
" ) SRD ON SR.TRAN_ID = SRD.b INNER JOIN ( SELECT * FROM dbo.survey_result_appl WHERE " +
"APPL_ENTITY = 'E' ) APP ON SRD.b = APP.TRAN_ID INNER JOIN ( SELECT * FROM dbo.survey_result_appl " +
"WHERE APPL_ENTITY = 'I' ) APPR ON SRD.b = APPR.TRAN_ID INNER JOIN dbo.employee e ON " +
"APP.ENTITY_CODE = e.code INNER JOIN dbo.survey_master sm ON SRD.SURVEY_CODE = sm.SURVEY_CODE " +
"WHERE APP.ENTITY_CODE = '"+participentCode+"' " + "WHERE APP.ENTITY_CODE = '"+participentCode+"' " +
"GROUP BY (e.FIRSTNAME +' '+ e.LASTNAME) , APPR.ENTITY_DESCR , e.code, SRE.emp_code, SRD.b ) DET_PRD ON HDR.CODE = DET_PRD.CODE ) X WHERE upper(report)='MARKS' ) SELECT as_det1.*, (SELECT SUM(result_range_max) AS tot_marks FROM dbo.survey_master WHERE survey_code IN (SELECT survey_code FROM dbo.survey_templ_det " + "GROUP BY (e.FIRSTNAME +' '+ e.LASTNAME) , APPR.ENTITY_DESCR , e.code, SRE.emp_code, SRD.b ) DET_PRD ON " +
" HDR.CODE = DET_PRD.CODE ) X WHERE upper(report)='MARKS' ) SELECT as_det1.code,as_det1.prd_name, " +
"as_det1.mgr_name, as_det1.mgr_code, as_det1.perc, as_det1.report, as_det1.resultcnt, as_det1.total, " +
"(SELECT SUM(result_range_max) AS tot_marks FROM dbo.survey_master WHERE survey_code IN " +
"(SELECT survey_code FROM dbo.survey_templ_det " +
"WHERE survey_templ='"+eventCode+"' " + "WHERE survey_templ='"+eventCode+"' " +
") ) outof_marks , ( employee.firstname +' '+ employee.lastname) AS emp_name,'"+eventCode+"' as survey_templ FROM as_det1 INNER JOIN employee ON as_det1.code=employee.code "; ") ) outof_marks , ( employee.firstname +' '+ employee.lastname) AS emp_name,'"+eventCode+"' as survey_templ, as_det1.NEW_TRAN_ID " +
"FROM as_det1 INNER JOIN employee ON as_det1.code=employee.code ";
...@@ -348,7 +402,8 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -348,7 +402,8 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
rowData.put("magagerName",checkNull( rs.getString("MGR_NAME"))); rowData.put("magagerName",checkNull( rs.getString("MGR_NAME")));
rowData.put("uniqueCode",checkNull( rs.getString("MGR_CODE"))); rowData.put("uniqueCode",checkNull( rs.getString("MGR_CODE")));
rowData.put("survey_templ",checkNull( rs.getString("SURVEY_TEMPL"))); rowData.put("survey_templ",checkNull( rs.getString("SURVEY_TEMPL")));
// rowData.put("mgr",checkNull( rs.getString("MGR"))); // rowData.put("mgr",checkNull( rs.getString("MGR")));
rowData.put("new_tran_id", checkNull(rs.getString("NEW_TRAN_ID")));
rowData.put("tbldisplay", "style='display: visible'"); rowData.put("tbldisplay", "style='display: visible'");
rowData.put("circledisplay", "c100"); rowData.put("circledisplay", "c100");
rawDataParticipentProductDetailJson.put(Integer.valueOf(count), rowData); rawDataParticipentProductDetailJson.put(Integer.valueOf(count), rowData);
...@@ -392,7 +447,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -392,7 +447,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode) throws RemoteException, ITMException public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode, String newTranId) throws RemoteException, ITMException
{ {
JSONObject rawDataProductDetailJson = new JSONObject(); JSONObject rawDataProductDetailJson = new JSONObject();
JSONObject rowData = null; JSONObject rowData = null;
...@@ -428,7 +483,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo ...@@ -428,7 +483,7 @@ public class LiveEventDetails extends ValidatorEJB implements LiveEventDetailsLo
" WHERE RTRIM(LTRIM(e.FIRSTNAME +' '+ e.LASTNAME)) = '"+personName+"' " + " WHERE RTRIM(LTRIM(e.FIRSTNAME +' '+ e.LASTNAME)) = '"+personName+"' " +
" AND RTRIM(LTRIM(APPR.ENTITY_DESCR)) = '"+productName+"' " + " AND RTRIM(LTRIM(APPR.ENTITY_DESCR)) = '"+productName+"' " +
" AND SRE.EMP_CODe = '"+mgrCode+"' " + " AND SRE.EMP_CODe = '"+mgrCode+"' " +
" AND std.SURVEY_TEMPL ='"+eventCode+"' )a " + " AND std.SURVEY_TEMPL ='"+eventCode+"' and srd.tran_id='"+newTranId+"' )a " +
" GROUP BY EMP_CODE, SURVEY_CODE, SURVEY, result1 "; " GROUP BY EMP_CODE, SURVEY_CODE, SURVEY, result1 ";
/*Last Used*/ /*Last Used*/
......
...@@ -12,5 +12,5 @@ public interface LiveEventDetailsLocal extends ValidatorLocal ...@@ -12,5 +12,5 @@ public interface LiveEventDetailsLocal extends ValidatorLocal
public JSONObject getParticipentEventSummary(String dataSourceName,String eventCode) throws RemoteException, ITMException; public JSONObject getParticipentEventSummary(String dataSourceName,String eventCode) throws RemoteException, ITMException;
public JSONObject getParticipentEventDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException; public JSONObject getParticipentEventDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException;
public JSONObject getParticipentProductDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException; public JSONObject getParticipentProductDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException;
public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode) throws RemoteException, ITMException; public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode, String newTranId) throws RemoteException, ITMException;
} }
...@@ -13,5 +13,5 @@ public interface LiveEventDetailsRemote extends ValidatorRemote ...@@ -13,5 +13,5 @@ public interface LiveEventDetailsRemote extends ValidatorRemote
public JSONObject getParticipentEventSummary(String dataSourceName,String eventCode) throws RemoteException, ITMException; public JSONObject getParticipentEventSummary(String dataSourceName,String eventCode) throws RemoteException, ITMException;
public JSONObject getParticipentEventDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException; public JSONObject getParticipentEventDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException;
public JSONObject getParticipentProductDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException; public JSONObject getParticipentProductDetail(String dataSourceName,String eventCode,String participentCode) throws RemoteException, ITMException;
public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode) throws RemoteException, ITMException; public JSONObject getProductDetail(String dataSourceName,String personName,String productName,String mgrCode,String eventCode, String newTranId) throws RemoteException, ITMException;
} }
...@@ -33,6 +33,7 @@ public class ProductDetailServlet extends HttpServlet ...@@ -33,6 +33,7 @@ public class ProductDetailServlet extends HttpServlet
String productName = ""; String productName = "";
String uniqueCode = ""; String uniqueCode = "";
String eventCode = ""; String eventCode = "";
String newTranId = "";
try try
{ {
response.setContentType("application/xml"); response.setContentType("application/xml");
...@@ -41,11 +42,12 @@ public class ProductDetailServlet extends HttpServlet ...@@ -41,11 +42,12 @@ public class ProductDetailServlet extends HttpServlet
productName = request.getParameter("productName"); productName = request.getParameter("productName");
uniqueCode = request.getParameter("code"); uniqueCode = request.getParameter("code");
eventCode = request.getParameter("eventCode"); eventCode = request.getParameter("eventCode");
newTranId = request.getParameter("newTranId");
System.out.println("uniqueCode==="+uniqueCode); System.out.println("uniqueCode==="+uniqueCode);
System.out.println(" ProductDetailServlet uniqueCode ="+uniqueCode+"=== personName =" + personName + "===== dataSourceName :"+dataSourceName); System.out.println(" ProductDetailServlet uniqueCode ="+uniqueCode+"=== personName =" + personName + "===== dataSourceName :"+dataSourceName);
context = new InitialContext(appConnectParm.getProperty()); context = new InitialContext(appConnectParm.getProperty());
liveEventDetailsRemote = (LiveEventDetailsRemote) context.lookup("ibase/LiveEventDetails/remote"); liveEventDetailsRemote = (LiveEventDetailsRemote) context.lookup("ibase/LiveEventDetails/remote");
JSONObject jsonObjData = (JSONObject) liveEventDetailsRemote.getProductDetail(dataSourceName,personName,productName,uniqueCode,eventCode); JSONObject jsonObjData = (JSONObject) liveEventDetailsRemote.getProductDetail(dataSourceName,personName,productName,uniqueCode,eventCode,newTranId);
OutputStream outputStream = response.getOutputStream(); OutputStream outputStream = response.getOutputStream();
outputStream.write(jsonObjData.toString().getBytes()); outputStream.write(jsonObjData.toString().getBytes());
outputStream.flush(); outputStream.flush();
......
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