|
|
@@ -173,7 +173,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
reserve = Double.valueOf(reserveCellValue.toString());
|
|
|
int compareTo = reserve.compareTo(DoubleConstant.maxReserve);
|
|
|
if(compareTo > 0) {
|
|
|
- releaseProductByBatch.addErrmsg("6:发布数量大于了我们设置的最大值99999999");
|
|
|
+ releaseProductByBatch.addErrmsg("6:发布数量大于了我们设置的最大值" + DoubleConstant.maxReserve);
|
|
|
}else if(NumberUtil.compare(reserve, DoubleConstant.zero) < 1) {
|
|
|
releaseProductByBatch.addErrmsg("6:发布数量必须大于0");
|
|
|
}
|
|
|
@@ -282,7 +282,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
// 最小包单价
|
|
|
Object priceMinPackQtyCellValue = readWorkBookCell(row.getCell(9), Cell.CELL_TYPE_STRING, r, 9);
|
|
|
releaseProductByBatch.setMinPackPriceStr(String.valueOf(priceMinPackQtyCellValue));
|
|
|
- if ((priceMinPackQtyCellValue != null)&&(isNumber(priceMinPackQtyCellValue.toString()))) {
|
|
|
+ if ((priceMinPackQtyCellValue != null)&&(isNumber(priceMinPackQtyCellValue.toString())) && (NumberUtil.compare(Double.valueOf(priceMinPackQtyCellValue.toString()), 0.0d) > 0)) {
|
|
|
Double price = Double.valueOf(priceMinPackQtyCellValue.toString());
|
|
|
price = fractionNumCeil(price, 6);
|
|
|
if(Currency.USD.equals(currency)) {
|
|
|
@@ -291,7 +291,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
releaseProductByBatch.setRmbMinPackPrice(price);
|
|
|
}
|
|
|
}else {
|
|
|
- releaseProductByBatch.addErrmsg("10:最小包单价信息为空");
|
|
|
+ releaseProductByBatch.addErrmsg("10:最小包单价信息必须是大于0的数字");
|
|
|
}
|
|
|
|
|
|
Object deliveryMinCellValue = readWorkBookCell(row.getCell(10), Cell.CELL_TYPE_STRING, r, 10);
|
|
|
@@ -493,7 +493,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if((min != null) || (max != null)) {
|
|
|
min = min == null ? max : min;
|
|
|
max = max == null ? min : max;
|
|
|
- if(min.shortValue() > ShortConstant.maxDelivery || min.shortValue() < 0 || max.shortValue() > Short.MAX_VALUE || max.shortValue() < 0){
|
|
|
+ if(min.shortValue() > ShortConstant.maxDelivery.shortValue() || min.shortValue() < 0 || max.shortValue() > ShortConstant.maxDelivery.shortValue() || max.shortValue() < 0){
|
|
|
releaseProductByBatch.addErrmsg("11-12:交期的信息必须为正整数并且小于" + ShortConstant.maxDelivery);
|
|
|
}else {
|
|
|
if(min.shortValue() > max.shortValue()) {
|
|
|
@@ -640,7 +640,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
Object priceCellValue = readWorkBookCell(cellPrice, Cell.CELL_TYPE_STRING, r, num + 1);
|
|
|
releaseProductByBatch.setFragmentPrice(String.valueOf(priceCellValue), i);
|
|
|
- if ((endQtyCellValue != null)&&(isNumber(endQtyCellValue.toString()))) {
|
|
|
+ if ((endQtyCellValue != null)&&(isNumber(endQtyCellValue.toString())) && (NumberUtil.compare(Double.valueOf(endQtyCellValue.toString()), 0.0d) > 0)) {
|
|
|
Double end = Double.valueOf(endQtyCellValue.toString());
|
|
|
GoodsQtyPrice qtyPrice = new GoodsQtyPrice();
|
|
|
// 分段结束值 与最小库存比较
|