Commit ed59875862c0f5670355cd8844f383e4381b0c92
1 parent
f99512ad
Exists in
master
Redmine #4207
Showing
5 changed files
with
5 additions
and
5 deletions
Show diff stats
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/AtendimentoRequisicaoConsumoController.java
@@ -137,7 +137,7 @@ public class AtendimentoRequisicaoConsumoController extends GenericController<At | @@ -137,7 +137,7 @@ public class AtendimentoRequisicaoConsumoController extends GenericController<At | ||
137 | }catch(Throwable e){ | 137 | }catch(Throwable e){ |
138 | if(e.getCause() instanceof ConstraintViolationException){ | 138 | if(e.getCause() instanceof ConstraintViolationException){ |
139 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 139 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
140 | - if(ex.getSQLException().getMessage().contains("codigo_unico_atendimento")){ | 140 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
141 | uniqueConstraintViolate = true; | 141 | uniqueConstraintViolate = true; |
142 | }else{ | 142 | }else{ |
143 | throw e; | 143 | throw e; |
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/BaixaAlmoxarifadoController.java
@@ -70,7 +70,7 @@ public class BaixaAlmoxarifadoController extends GenericController<BaixaAlmoxari | @@ -70,7 +70,7 @@ public class BaixaAlmoxarifadoController extends GenericController<BaixaAlmoxari | ||
70 | }catch(Throwable e){ | 70 | }catch(Throwable e){ |
71 | if(e.getCause() instanceof ConstraintViolationException){ | 71 | if(e.getCause() instanceof ConstraintViolationException){ |
72 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 72 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
73 | - if(ex.getSQLException().getMessage().contains("codigo_unico_baixaal")){ | 73 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
74 | uniqueConstraintViolate = true; | 74 | uniqueConstraintViolate = true; |
75 | }else{ | 75 | }else{ |
76 | throw e; | 76 | throw e; |
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/DevolucaoController.java
@@ -112,7 +112,7 @@ public class DevolucaoController extends GenericController<Devolucao> { | @@ -112,7 +112,7 @@ public class DevolucaoController extends GenericController<Devolucao> { | ||
112 | }catch(Throwable e){ | 112 | }catch(Throwable e){ |
113 | if(e.getCause() instanceof ConstraintViolationException){ | 113 | if(e.getCause() instanceof ConstraintViolationException){ |
114 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 114 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
115 | - if(ex.getSQLException().getMessage().contains("codigo_unico_devolucao")){ | 115 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
116 | uniqueConstraintViolate = true; | 116 | uniqueConstraintViolate = true; |
117 | }else{ | 117 | }else{ |
118 | throw e; | 118 | throw e; |
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/EntradaAlmoxarifadoController.java
@@ -91,7 +91,7 @@ public class EntradaAlmoxarifadoController extends GenericController<EntradaAlmo | @@ -91,7 +91,7 @@ public class EntradaAlmoxarifadoController extends GenericController<EntradaAlmo | ||
91 | }catch(Throwable e){ | 91 | }catch(Throwable e){ |
92 | if(e.getCause() instanceof ConstraintViolationException){ | 92 | if(e.getCause() instanceof ConstraintViolationException){ |
93 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 93 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
94 | - if(ex.getSQLException().getMessage().contains("codigo_unico_entradaal") || ex.getSQLException().getMessage().contains("codigo_unico_entrada")){ | 94 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
95 | uniqueConstraintViolate = true; | 95 | uniqueConstraintViolate = true; |
96 | }else{ | 96 | }else{ |
97 | throw e; | 97 | throw e; |
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/RequisicaoConsumoController.java
@@ -138,7 +138,7 @@ public class RequisicaoConsumoController extends GenericController<RequisicaoCon | @@ -138,7 +138,7 @@ public class RequisicaoConsumoController extends GenericController<RequisicaoCon | ||
138 | }catch(Throwable e){ | 138 | }catch(Throwable e){ |
139 | if(e.getCause() instanceof ConstraintViolationException){ | 139 | if(e.getCause() instanceof ConstraintViolationException){ |
140 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); | 140 | ConstraintViolationException ex = (ConstraintViolationException) e.getCause(); |
141 | - if(ex.getSQLException().getMessage().contains("codigo_unico_reqconsumo")){ | 141 | + if(ex.getSQLException().getMessage().contains("codigo_unico")){ |
142 | uniqueConstraintViolate = true; | 142 | uniqueConstraintViolate = true; |
143 | }else{ | 143 | }else{ |
144 | throw e; | 144 | throw e; |