Commit def477e7 authored by ngadkari's avatar ngadkari

sales return form split key changes

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213442 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4151ff0a
...@@ -247,7 +247,8 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur ...@@ -247,7 +247,8 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur
java.text.SimpleDateFormat sdf = null; java.text.SimpleDateFormat sdf = null;
int lineNo = 0, crCount = 0; int lineNo = 0, crCount = 0;
String retRef="",reasCodeH = "",fullRetHdr=""; String retRef="",reasCodeH = "",fullRetHdr="";
String invoiceRef="",docKey="";// added by nandkumar gadkari on 03/09/19 String invoiceRef="",docKey="",srfSplitKey="" , srfSplitKeyListArr[]=null,docValue="" ;// added by nandkumar gadkari on 03/09/19
try try
{ {
DistCommon distCommom = new DistCommon(); DistCommon distCommom = new DistCommon();
...@@ -578,19 +579,65 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur ...@@ -578,19 +579,65 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur
} }
pstmt2.close(); pstmt2.close();
rs2.close(); rs2.close();
// 21/11/11 manoharan check whether to consider cr_term, ship_to_zip_code in splitcode
if (crCount > 0 ) //added by nandkumar gadkari on 10/12/19-------------start-------------------'
{ tempSplitCode= "";
//tempSplitCode = itemSerDet+"@"+crterm+"@"+custCd; // **************** this need to be changed as per taro requirement srfSplitKey=distCommom.getDisparams("999999", "SRF_SPLIT_KEY", conn);
tempSplitCode = itemSerDet+"@"+invoiceIdDet+"@"+custCd+"@"+crterm+"@"+statusDet; if (srfSplitKey != null && srfSplitKey.trim().length() > 0) {
srfSplitKeyListArr = srfSplitKey.split(",");
ArrayList<String> srfSplitKeyList = new ArrayList<String>(Arrays.asList(srfSplitKeyListArr));
for(String key : srfSplitKeyList)
{
if("item_ser".equalsIgnoreCase(key))
{
docValue =itemSerDet;
}
if("invoice_id".equalsIgnoreCase(key))
{
docValue =invoiceIdDet;
}
if("cust_code".equalsIgnoreCase(key))
{
docValue =custCd;
}
if("cr_term".equalsIgnoreCase(key))
{
docValue =crterm;
}
if("status".equalsIgnoreCase(key))
{
docValue =statusDet;
}
if (tempSplitCode != "" && tempSplitCode.trim().length() > 0)
{
tempSplitCode = tempSplitCode + "@" + ( docValue == null || docValue.trim().length() == 0 ? "" : docValue);
}
else
{
tempSplitCode = docValue;
}
}
System.out.println("tempSplitCode["+tempSplitCode+"]");
} }
else else
{ {
//Added by kunal D18CKOY001 //added by nandkumar gadkari on 10/12/19-------------end-------------------'
//tempSplitCode = itemSerDet // 21/11/11 manoharan check whether to consider cr_term, ship_to_zip_code in splitcode
tempSplitCode = itemSerDet+"@"+invoiceIdDet+"@"+statusDet;
if (crCount > 0 )
{
//tempSplitCode = itemSerDet+"@"+crterm+"@"+custCd; // **************** this need to be changed as per taro requirement
tempSplitCode = itemSerDet+"@"+invoiceIdDet+"@"+custCd+"@"+crterm+"@"+statusDet;
}
else
{
//Added by kunal D18CKOY001
//tempSplitCode = itemSerDet
tempSplitCode = itemSerDet+"@"+invoiceIdDet+"@"+statusDet;
}
// end 21/11/11 manoharan check whether to consider cr_term, ship_to_zip_code in splitcode
} }
// end 21/11/11 manoharan check whether to consider cr_term, ship_to_zip_code in splitcode
if(splitCodeWiseMap.containsKey(tempSplitCode)) if(splitCodeWiseMap.containsKey(tempSplitCode))
{ {
tempList = (ArrayList) splitCodeWiseMap.get(tempSplitCode); tempList = (ArrayList) splitCodeWiseMap.get(tempSplitCode);
...@@ -722,7 +769,12 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur ...@@ -722,7 +769,12 @@ public class SalesReturnFormSplit extends ActionHandlerEJB implements SalesRetur
System.out.println("Length---"+splitCode.split("@").length); System.out.println("Length---"+splitCode.split("@").length);
//String tempstr[] = splitCode.split("$"); //String tempstr[] = splitCode.split("$");
//itemSer = checkNull(tempstr[0]); //itemSer = checkNull(tempstr[0]);
if(splitCode.split("@").length != 0)
if(splitCode.split("@").length == 1)// added by nandkumar gadkari on 12/12/19
{
itemSer1 = checkNull(splitCode.split("@")[0]);
}
if(splitCode.split("@").length > 1)// change condition !=0 to grater than 1 by nandkumar gadkari on 12/12/19
{ {
itemSer1 = checkNull(splitCode.split("@")[0]); itemSer1 = checkNull(splitCode.split("@")[0]);
invoice1 = checkNull(splitCode.split("@")[1]); invoice1 = checkNull(splitCode.split("@")[1]);
......
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