| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import zy.cloud.wms.common.config.CodeCoolException; |
| | |
| | | import zy.cloud.wms.manager.service.LocDetlService; |
| | | import zy.cloud.wms.manager.service.MatService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("locDetlService") |
| | |
| | | @Override |
| | | public LocDetl getLocDetl(Long nodeId, String matnr) { |
| | | return this.baseMapper.selectByLocNoAndMatnr(nodeId, matnr); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> findOfSort(String matnr) { |
| | | List<LocDetl> result = new ArrayList<>(); |
| | | List<LocDetl> locDetls = this.baseMapper.selectByPrior(matnr, null); |
| | | if (!Cools.isEmpty(locDetls)) { |
| | | result.addAll(locDetls); |
| | | } |
| | | List<LocDetl> locDetls1 = this.selectList(new EntityWrapper<LocDetl>().eq("matnr", matnr).eq("status", 1).orderBy("create_time")); |
| | | if (!Cools.isEmpty(locDetls1)) { |
| | | result.addAll(locDetls1); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Boolean reduceStock(Long nodeId, String matnr, Double anfme) { |
| | | return this.baseMapper.reduceStock(nodeId, matnr, anfme)>0; |
| | | } |
| | | |
| | | |
| | | } |