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)
|
public static String completeTipoVariazione(Connection connection, AtbGriglieArt atbGriglieArt)
|
||||||
throws SQLException {
|
throws SQLException {
|
||||||
|
|
||||||
String sql = "SELECT tipo_variazione" + " FROM dbo.getGrigliaAcquisto("
|
String sql =
|
||||||
+ UtilityDB.valueDateToString(atbGriglieArt.getDataValidita(), CommonConstants.DATE_FORMAT_YMD) + ","
|
Query.format("SELECT tipo_variazione"
|
||||||
+ UtilityDB.valueToString(atbGriglieArt.getCodAlis()) + ","
|
+ " FROM dbo.getGrigliaAcquisto(%s, %s,%s, %s, %s)",
|
||||||
+ UtilityDB.valueToString(atbGriglieArt.getCodMdep()) + ","
|
atbGriglieArt.getDataValidita(),
|
||||||
+ UtilityDB.valueToString(atbGriglieArt.getCodArtFor()) + ","
|
atbGriglieArt.getCodAlis(),
|
||||||
+ UtilityDB.valueToString(atbGriglieArt.getCodMart());
|
atbGriglieArt.getCodMdep(),
|
||||||
|
atbGriglieArt.getCodArtFor(),
|
||||||
|
atbGriglieArt.getCodMart());
|
||||||
|
|
||||||
List<HashMap<String, Object>> list = execQuery(connection, sql);
|
String tipoVariazione = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||||
if (list.isEmpty()) {
|
|
||||||
return "I";
|
return UtilityString.isNull(tipoVariazione, "I");
|
||||||
} else {
|
|
||||||
if ("D".equals(list.get(0).get("tipo_variazione").toString())) {
|
|
||||||
return "I";
|
|
||||||
} else
|
|
||||||
return "U";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String completeTipoVariazioneLisa(Connection connection, MtbLisaData mtbLisaData) throws Exception {
|
public static String completeTipoVariazioneLisa(Connection connection, MtbLisaData mtbLisaData) throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user