CORRETTA REGOLA
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -51,22 +51,18 @@ public class PurchasesRules extends QueryRules {
|
||||
public static String completeTipoVariazione(Connection connection, AtbGriglieArt atbGriglieArt)
|
||||
throws SQLException {
|
||||
|
||||
String sql = "SELECT tipo_variazione" + " FROM dbo.getGrigliaAcquisto("
|
||||
+ UtilityDB.valueDateToString(atbGriglieArt.getDataValidita(), CommonConstants.DATE_FORMAT_YMD) + ","
|
||||
+ UtilityDB.valueToString(atbGriglieArt.getCodAlis()) + ","
|
||||
+ UtilityDB.valueToString(atbGriglieArt.getCodMdep()) + ","
|
||||
+ UtilityDB.valueToString(atbGriglieArt.getCodArtFor()) + ","
|
||||
+ UtilityDB.valueToString(atbGriglieArt.getCodMart());
|
||||
String sql =
|
||||
Query.format("SELECT tipo_variazione"
|
||||
+ " FROM dbo.getGrigliaAcquisto(%s, %s,%s, %s, %s)",
|
||||
atbGriglieArt.getDataValidita(),
|
||||
atbGriglieArt.getCodAlis(),
|
||||
atbGriglieArt.getCodMdep(),
|
||||
atbGriglieArt.getCodArtFor(),
|
||||
atbGriglieArt.getCodMart());
|
||||
|
||||
List<HashMap<String, Object>> list = execQuery(connection, sql);
|
||||
if (list.isEmpty()) {
|
||||
return "I";
|
||||
} else {
|
||||
if ("D".equals(list.get(0).get("tipo_variazione").toString())) {
|
||||
return "I";
|
||||
} else
|
||||
return "U";
|
||||
}
|
||||
String tipoVariazione = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
|
||||
return UtilityString.isNull(tipoVariazione, "I");
|
||||
}
|
||||
|
||||
public static String completeTipoVariazioneLisa(Connection connection, MtbLisaData mtbLisaData) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user