parent
4afaca7211
commit
c3918e00d0
@ -34,14 +34,15 @@ public class DeclareDocxSubmitValidator extends AbstractValidator {
|
|||||||
map.put(index, exportmat);
|
map.put(index, exportmat);
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
BigDecimal amt = BigDecimal.ZERO;
|
||||||
for (Map.Entry<Integer, BigDecimal> entry : map.entrySet()) {
|
for (Map.Entry<Integer, BigDecimal> entry : map.entrySet()) {
|
||||||
Integer idx = entry.getKey();
|
Integer idx = entry.getKey();
|
||||||
BigDecimal amt = entry.getValue();
|
amt = entry.getValue();
|
||||||
if (amt.compareTo(BigDecimal.ZERO) != 0) {
|
|
||||||
sb.append(String.format("商品明细第 [ %s ] 行,出库金额跟报关金额差值 [ %s ]不允许提交,请修改后重试。", idx + 1, amt.setScale(2, RoundingMode.HALF_UP)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (amt.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
sb.append(String.format("商品明细,出库金额跟报关金额差值 [ %s ]不允许提交,请修改后重试。", amt.setScale(2, RoundingMode.HALF_UP)));
|
||||||
|
}
|
||||||
if (sb.length() > 0) {
|
if (sb.length() > 0) {
|
||||||
this.addErrorMessage(extendedDataEntity, sb.toString());
|
this.addErrorMessage(extendedDataEntity, sb.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user