| | |
| | | } |
| | | |
| | | /** |
| | | * 查询数据列表 |
| | | * @param depotId |
| | | * @param limit 查询条数 |
| | | * @return |
| | | */ |
| | | public List<Quantity> getQuantityList(String depotId, Integer limit) { |
| | | if (StringUtils.isEmpty(depotId)) { |
| | | return null; |
| | | } |
| | | |
| | | QueryWrapper<Quantity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("depot_id", depotId); |
| | | queryWrapper.orderByDesc("receive_date"); |
| | | queryWrapper.last("LIMIT " + limit); |
| | | |
| | | return quantityMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 保存数据 |
| | | * |
| | | * @param data |
| | | */ |
| | | public void saveData(Quantity data) { |
| | | quantityMapper.insert(data); |
| | | } |
| | | |
| | | /** |
| | | * 查询配置信息,根据库区编码获取 |
| | | * |
| | | * @param companyId |