Commit 1a859005 authored by awarekar's avatar awarekar

To display Sundry details in side panel

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196796 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6962deda
......@@ -46,12 +46,12 @@ public class DataModelComponent extends E12DataModelComponent
e.printStackTrace();
}
}
@Override
public String getDMDataJson( String dataModelName, String fieldValue, String userInfoStr)throws Exception
{
BaseLogger.log("2", null, null,"DataModelComponent 2835 dataModelName= "+dataModelName+" fieldValue= "+fieldValue+" userInfoStr= "+userInfoStr );
String returnJsonData = "";
String imgPath ="";
try
{
Connection myCon = null;
......@@ -155,6 +155,55 @@ public class DataModelComponent extends E12DataModelComponent
break;*/
//Changed by Amey W on 28/01/2019 [To display PAN_NO in side panel] END
//By Sainath T. on 13/12/2018 [To add columns in supplier details]-END
/*else if( dataModelName.equalsIgnoreCase("customer") )
{
finalQuery = "SELECT CUSTOMER.CUST_NAME ,CUSTOMER.CURR_CODE,CONTACT.TELE1 AS CONTACT, CONTACT.NAME AS CONTACT_NAME,CONTACT.EMAIL_ADDR, CUSTOMER.CUST_PRIORITY AS RANK,CASE WHEN CRTERM.DESCR IS NULL THEN CUSTOMER.CR_TERM ELSE CRTERM.DESCR END AS CRTERM_DESC ,CASE WHEN DELIVERY_TERM.DESCR IS NULL THEN CUSTOMER.DLV_TERM ELSE DELIVERY_TERM.DESCR END AS DLVTERM_DESC, SALES_PERS.SP_NAME , SALES_PERS.EMAIL_ADDR AS SALES_EMAIL, CUSTOMER.BLACK_LISTED, CUSTOMER.BLACK_LISTED_DATE, (SELECT FN_OUVERDUE_CHECK(null) FROM DUAL ) AS DUE_AMOUNT_TILL_DATE, CUSTOMER.CREDIT_LMT, CUSTOMER.WAVE_TYPE, (SELECT FN_PAYAMT_CHECK(null) FROM DUAL ) AS PAY_AMOUNT, CUSTOMER.TAX_REG_2 AS GST_TAX_REG FROM CUSTOMER CUSTOMER, CONTACT CONTACT, CRTERM CRTERM, DELIVERY_TERM DELIVERY_TERM, SALES_PERS SALES_PERS WHERE CUSTOMER.CONTACT_CODE = CONTACT.CONTACT_CODE AND CUSTOMER.CR_TERM = CRTERM.CR_TERM(+) AND CUSTOMER.DLV_TERM = DELIVERY_TERM.DLV_TERM(+) AND CUSTOMER.SALES_PERS = SALES_PERS.SALES_PERS (+) AND CUSTOMER.CUST_CODE = '"+fieldValue+"'" : "SELECT * FROM CUSTOMER";
}*/
else if( dataModelName.equalsIgnoreCase("customer") )
{
System.out.println("xxx========> in customer");
finalQuery = (!"".equals(fieldValue)) ? "SELECT CUSTOMER.CUST_NAME , " +
" CUSTOMER.CURR_CODE, " +
" CONTACT.TELE1 AS CONTACT, " +
" CONTACT.NAME AS CONTACT_NAME, " +
" CONTACT.EMAIL_ADDR , " +
" CUSTOMER.CUST_PRIORITY AS RANK, " +
" CASE " +
" WHEN CRTERM.DESCR IS NULL " +
" THEN CUSTOMER.CR_TERM " +
" ELSE CRTERM.DESCR " +
" END AS CRTERM_DESC , " +
" CASE " +
" WHEN DELIVERY_TERM.DESCR IS NULL " +
" THEN CUSTOMER.DLV_TERM " +
" ELSE DELIVERY_TERM.DESCR " +
" END AS DLVTERM_DESC, " +
" SALES_PERS.SP_NAME , " +
" SALES_PERS.EMAIL_ADDR AS SALES_EMAIL, " +
" CUSTOMER.BLACK_LISTED, " +
" CUSTOMER.BLACK_LISTED_DATE, " +
" (SELECT FN_OUVERDUE_CHECK('"+fieldValue+"') FROM DUAL " +
" ) AS DUE_AMOUNT_TILL_DATE, " +
" CUSTOMER.CREDIT_LMT, " +
" CUSTOMER.WAVE_TYPE, " +
" (SELECT FN_PAYAMT_CHECK('"+fieldValue+"') FROM DUAL " +
" ) AS PAY_AMOUNT, " +
" CUSTOMER.TAX_REG_2 AS GST_TAX_REG"+//Added by PriyankaC on 28July2017.
" FROM CUSTOMER CUSTOMER, " +
" CONTACT CONTACT , " +
" CRTERM CRTERM, " +
" DELIVERY_TERM DELIVERY_TERM, " +
" SALES_PERS SALES_PERS " +
" WHERE CUSTOMER.CONTACT_CODE = CONTACT.CONTACT_CODE " +
" AND CUSTOMER.CR_TERM = CRTERM.CR_TERM(+) " +
" AND CUSTOMER.DLV_TERM = DELIVERY_TERM.DLV_TERM(+) " +
" AND CUSTOMER.SALES_PERS = SALES_PERS.SALES_PERS (+) " +
" AND CUSTOMER.CUST_CODE = '"+fieldValue+"'" : "SELECT * FROM CUSTOMER";
}
else if ( dataModelName.equalsIgnoreCase("taxclass") )
{
finalQuery = (!"".equals(fieldValue)) ? "SELECT * FROM TAXCLASS WHERE TAX_CLASS = '"+fieldValue+"'" : "SELECT * FROM TAXCLASS";
......@@ -231,8 +280,26 @@ public class DataModelComponent extends E12DataModelComponent
}
jsonObject.put(columnName, columnValue);
//BaseLogger.log("3", userInfo, null,"colCount["+colCount+"]columnName[" + columnName + "]columnValue[" + columnValue + "]");
//System.out.println("colCount["+colCount+"]columnName[" + columnName + "]columnValue[" + columnValue + "]");
}
if( dataModelName.equalsIgnoreCase("customer") )
{
System.out.println(" DM == Customer");
Object custImgObj = jsonObject.get("CUST_NAME");
if (custImgObj == null)
{
//BaseLogger.log("3", userInfo, null,"custImgObj is null");
custImgObj = "";
}
else
{
String custImg = checkNull(custImgObj.toString());
CustomerDetails customerDetail = new CustomerDetails( userInfo );
imgPath = customerDetail.getCustomerImage(fieldValue.trim(), custImg.trim(),userInfo);
System.out.println("imgPath is ::: ["+ imgPath +"].... now stroring in jsonObject...");
jsonObject.put("img_path", imgPath);
}
}
jsonArray.put(jsonObject);
}
......
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