[ROSSOGARGANO - MES]
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
- aggiunto criterio di calcolo progressivo pedane in base alla linea
This commit is contained in:
@@ -1264,7 +1264,12 @@ public class CommonRules extends QueryRules {
|
||||
return maxProgressivoUl + 1;
|
||||
}
|
||||
|
||||
public static int retrieveNextProgressivoUlRG(Connection conn, String gestione, LocalDate dataOrd, int numOrd, int segno) throws SQLException {
|
||||
public static int retrieveNextProgressivoUlRG(Connection conn, String gestione, LocalDate dataOrd, int numOrd, int segno, String codJfas) throws Exception {
|
||||
|
||||
boolean isScadenzaMultipla = setupGest.getSetupDetBoolean(conn, "MES", "SETUP", "CONTROLLO_SCADENZA_MULTIPLA", codJfas);
|
||||
if (!isScadenzaMultipla) {
|
||||
return retrieveNextProgressivoUl(conn, gestione, dataOrd, numOrd, segno);
|
||||
}
|
||||
String sql = Query.format(
|
||||
"WITH partite AS (SELECT dot.cod_prod AS cod_mart, mpm.partita_mag_prod, dot.cod_jfas\n" +
|
||||
" FROM dtb_ordt dot\n" +
|
||||
|
||||
@@ -405,4 +405,8 @@ public class SetupGest {
|
||||
public boolean getSetupDetBoolean(String gestName, String section, String keySection, String colRif) throws Exception {
|
||||
return "S".equalsIgnoreCase(getSetupDet(gestName, section, keySection, colRif));
|
||||
}
|
||||
|
||||
public boolean getSetupDetBoolean(Connection conn, String gestName, String section, String keySection, String colRif) throws Exception {
|
||||
return "S".equalsIgnoreCase(getSetupDet(conn, gestName, section, keySection, colRif));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ when
|
||||
eval(postRulesEnabled && customer == IntegryCustomer.RossoGargano)
|
||||
$mtbColt: MtbColt(operation != OperationType.DELETE && progressivoUl == null && gestione != null && gestione == 'L' && dataOrd != null && numOrd != null)
|
||||
then
|
||||
int progressivoToSave = CommonRules.retrieveNextProgressivoUlRG(conn, $mtbColt.getGestione(), $mtbColt.getDataOrd(), $mtbColt.getNumOrd(), $mtbColt.getSegno());
|
||||
int progressivoToSave = CommonRules.retrieveNextProgressivoUlRG(conn, $mtbColt.getGestione(), $mtbColt.getDataOrd(), $mtbColt.getNumOrd(), $mtbColt.getSegno(), $mtbColt.getCodJfas());
|
||||
|
||||
modify($mtbColt){
|
||||
setProgressivoUl(progressivoToSave);
|
||||
|
||||
@@ -1093,6 +1093,7 @@ public class MesProductionServiceV2 {
|
||||
.setCodAnag(ordineLav.getCodAnag())
|
||||
.setPosizione(dto.getCodJfas())
|
||||
.setBarcodeUl(dto.getBarcodeUl())
|
||||
.setCodTcol(ordineLav.getCodTcolUl())
|
||||
.setOrders(Collections.singletonList(new CreateUDCRequestOrderDTO()
|
||||
.setGestione(dto.getGestione())
|
||||
.setNumOrd(dto.getNumOrd())
|
||||
|
||||
Reference in New Issue
Block a user