Commit dff09c6ba79f0c50692b0f76d7b38abf99f07f54
1 parent
459c26b9
平库快速入库-入库数量增加校验
Showing
1 changed file
with
4 additions
and
0 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
@@ -11,6 +11,7 @@ import javax.annotation.Resource; | @@ -11,6 +11,7 @@ import javax.annotation.Resource; | ||
11 | 11 | ||
12 | import org.apache.commons.lang3.StringUtils; | 12 | import org.apache.commons.lang3.StringUtils; |
13 | import org.jeecg.common.api.vo.Result; | 13 | import org.jeecg.common.api.vo.Result; |
14 | +import org.jeecg.common.exception.JeecgBootException; | ||
14 | import org.jeecg.modules.wms.api.erp.service.IErpService; | 15 | import org.jeecg.modules.wms.api.erp.service.IErpService; |
15 | import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; | 16 | import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; |
16 | import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; | 17 | import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; |
@@ -226,6 +227,9 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | @@ -226,6 +227,9 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | ||
226 | List<ReceiptDetail> receiptDetails = bean.getReceiptDetails(); | 227 | List<ReceiptDetail> receiptDetails = bean.getReceiptDetails(); |
227 | List<Receive> receiveList = new ArrayList<>(); | 228 | List<Receive> receiveList = new ArrayList<>(); |
228 | for (ReceiptDetail receiptDetail : receiptDetails) { | 229 | for (ReceiptDetail receiptDetail : receiptDetails) { |
230 | + if (receiptDetail.getQty() == null || receiptDetail.getQty().compareTo(BigDecimal.ZERO) == 0){ | ||
231 | + throw new JeecgBootException("物料编码:" + receiptDetail.getMaterialCode() + "入库数量不能为0!" ); | ||
232 | + } | ||
229 | Receive receive = new Receive(); | 233 | Receive receive = new Receive(); |
230 | receiptDetail.setReceiptId(receiptHeader.getId()); | 234 | receiptDetail.setReceiptId(receiptHeader.getId()); |
231 | receiptDetail.setCompanyCode(receiptHeader.getCompanyCode()); | 235 | receiptDetail.setCompanyCode(receiptHeader.getCompanyCode()); |