Merge branch 'develop' into feature/JDK11
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:
@@ -48,6 +48,8 @@ import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.types.TypeDbObject;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import it.integry.ems_model.utility.BarcodeEan128.Ean128Model;
|
||||
import it.integry.ems_model.utility.BarcodeEan128.UtilityBarcodeEan128;
|
||||
import it.integry.firebase.dto.MessageDTO;
|
||||
import it.integry.firebase.dto.webpush.WebpushConfigDTO;
|
||||
import it.integry.firebase.dto.webpush.WebpushNotificationDTO;
|
||||
@@ -1597,9 +1599,19 @@ public class PvmService {
|
||||
}
|
||||
|
||||
private MtbColt getColloByExternalBarcode(String barcode) throws Exception {
|
||||
Ean128Model model;
|
||||
try{
|
||||
model = UtilityBarcodeEan128.decode(barcode.getBytes());
|
||||
}catch (Exception e){
|
||||
model = new Ean128Model();
|
||||
}
|
||||
String sql = Query.format("SELECT * FROM " + MtbColt.ENTITY +
|
||||
" WHERE barcode_ul = %s", barcode);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(model.Sscc) && !model.Sscc.equalsIgnoreCase(barcode)) {
|
||||
sql += " OR barcode_ul = " + UtilityDB.valueToString(model.Sscc);
|
||||
}
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbColt.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user