Jelajahi Sumber

去除发货提醒时发货数量检测

hejq 7 tahun lalu
induk
melakukan
84361ea89d

+ 0 - 27
src/main/java/com/uas/platform/b2b/service/impl/PurchaseNoticeServiceImpl.java

@@ -375,8 +375,6 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
 			if (endQty > notice.getQty()) {
 				throw new IllegalOperatorException("累计发货数量将超出本次送货提醒的需求数!");
 			}
-			// 检验采购单需求数量
-			checkOrderQty(notice, thisQty);
 			PurchaseOrder order = notice.getOrderItem().getOrder();
 			send.setCurrency(order.getCurrency());
 			send.setBackStatus((short) Status.NOT_UPLOAD.value());
@@ -416,31 +414,6 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
 		}
 	}
 
-	/**
-	 * 校验发货提醒与采购单需求数量对比
-     *
-	 * @param notice 发货提醒
-	 * @param thisQty 本次发货数量
-	 */
-	private void checkOrderQty(PurchaseNotice notice, double thisQty) {
-		List<PurchaseNotice> notices = purchaseNoticeDao.findByOrderItemId(notice.getOrderItemId());
-		PurchaseOrderItem item = orderItemDao.findOne(notice.getOrderItemId());
-		// 查询所有已发货数量
-		Double sendQty = 0.0;
-		for (PurchaseNotice purchaseNotice : notices) {
-			if (purchaseNotice.getEnd() != null) {
-				if (purchaseNotice.getEnd() != 1) {
-					sendQty += purchaseNotice.getEndQty();
-				}
-			} else {
-				sendQty += purchaseNotice.getEndQty();
-			}
-		}
-		if (sendQty + thisQty > item.getQty()) {
-			throw new IllegalOperatorException("该采购单已发货数量[" + sendQty + "]本次发货数量["
-					+ thisQty + "]总数超过订单需求数量[" + item.getQty() + "],请核对数量后重新发货");
-		}
-	}
     @Override
 	public int getOnhandCount() {
 		return purchaseNoticeDao.getCountByVendUUAndStatus(SystemSession.getUser().getEnterprise().getUu(),