inventory

philip 4 years ago
parent 9ed8f5f895
commit e909e04bd1

@ -1,23 +1,19 @@
package com.foreverwin.mesnac.dispatch.service.impl; package com.foreverwin.mesnac.dispatch.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.common.enums.HandleEnum; import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.util.NumberUtil; import com.foreverwin.mesnac.common.util.NumberUtil;
import com.foreverwin.mesnac.common.util.StringUtil; import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.dispatch.mapper.SurplusItemReturnMapper;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import com.foreverwin.mesnac.dispatch.service.SurplusItemReturnService;
import com.foreverwin.mesnac.meapi.model.Inventory; import com.foreverwin.mesnac.meapi.model.Inventory;
import com.foreverwin.mesnac.meapi.service.InventoryService; import com.foreverwin.mesnac.meapi.service.InventoryService;
import com.foreverwin.modular.core.exception.BusinessException; import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import com.foreverwin.mesnac.dispatch.mapper.SurplusItemReturnMapper;
import com.foreverwin.mesnac.dispatch.service.SurplusItemReturnService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -46,7 +42,7 @@ public class SurplusItemReturnServiceImpl extends ServiceImpl<SurplusItemReturnM
if (inventoryModel == null) { if (inventoryModel == null) {
throw BusinessException.build("物料条码【" + inventory +"】不存在!"); throw BusinessException.build("物料条码【" + inventory +"】不存在!");
} }
if (inventoryModel.getQtyOnHand() <= 0) { if (inventoryModel.getQtyOnHand().doubleValue() <= 0) {
throw BusinessException.build("物料条码【" + inventory +"】没有可用数量!"); throw BusinessException.build("物料条码【" + inventory +"】没有可用数量!");
} }

Loading…
Cancel
Save