mardi 25 août 2020

Condition Java with Spring boot if else

I don't know why I have an ambiguity in my code during my tests with if and if else when it accesses a condition the program ends while I have tests which are true and it must concatenate my character string

my code:

if (rfx.equals("true")) {
                Query = Query +  "classification = RFX ";
            } else if (rfp.equals("true")) {
                Query = Query +  " or classification = RFP ";
            } else if (rfp_x.equals("true")) {
                Query = Query +  "or classification = RFP(X) ";
            } else if (eu.equals("true")) {
                Query = Query +  " and region = EU ";
            } else if (americas.equals("true")) {
                Query = Query + " or region = AMERICAS ";
            } else if (aae.equals("true")) {
                Query = Query + " or region = AAE ";
            } else if (ger.equals("true")) {
                Query = Query + " or region = GER ";
            } else if (eu2.equals("true")) {
                Query = Query + " or region = EU2 ";
            } else if (latam.equals("true")) {
                Query = Query + " or region = LATAM ";
            } else if (empty.equals("true")) {
                Query = Query + " or region = EMPTY ";
            } else if (idm.equals("true")) {
                Query = Query + " and practice = IDM ";
            } else if (dig.equals("true")) {
                Query = Query + " or practice = DIG ";
            } else if (eps.equals("true")) {
                Query = Query + " or practice = EPS ";
            } else if (co.equals("true")) {
                Query = Query + " or practice = RFX ";
            } else if (tec.equals("true")) {
                Query = Query + " or practice = RFX ";
            } else if (bds.equals("true")) {
                Query = Query + " or practice = RFX ";
            } else if (tts.equals("true")) {
                Query = Query + " or practice = TTS ";
            } else if (bidinprocess.equals("true")) {
                Query = Query + " and workflowtracking = Bid in process ";
            } else if (bidrevision.equals("true")) {
                Query = Query + " or workflowtracking = Bid revision ";
            } else if (checkingabilitytosupply.equals("true")) {
                Query = Query + " or workflowtracking = Checking ability to supply ";
            } else if (checkingonavailability.equals("true")) {
                Query = Query + " or workflowtracking = Checking on availability ";
            } else if (checkingonfeasibility.equals("true")) {
                Query = Query + " or workflowtracking = Checking on feasability ";
            } else if (closedrvopen.equals("true")) {
                Query = Query + " or workflowtracking = Closed (RV open) ";
            } else if (closed.equals("true")) {
                Query = Query + " or workflowtracking = Closed ";
            }

Aucun commentaire:

Enregistrer un commentaire