|
|
|
@ -3,10 +3,7 @@ package com.zhehekeji.web.service;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.zhehekeji.core.util.Assert;
|
|
|
|
import com.zhehekeji.core.util.Assert;
|
|
|
|
import com.zhehekeji.web.entity.Stock;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.entity.Street;
|
|
|
|
import com.zhehekeji.web.entity.Street;
|
|
|
|
import com.zhehekeji.web.mapper.OrderLastMediaMapper;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.mapper.StockMapper;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.mapper.StreetMapper;
|
|
|
|
import com.zhehekeji.web.mapper.StreetMapper;
|
|
|
|
import com.zhehekeji.web.pojo.street.StreetSearch;
|
|
|
|
import com.zhehekeji.web.pojo.street.StreetSearch;
|
|
|
|
import com.zhehekeji.web.pojo.street.StreetType;
|
|
|
|
import com.zhehekeji.web.pojo.street.StreetType;
|
|
|
|
@ -27,12 +24,8 @@ public class StreetService {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private StreetMapper streetMapper;
|
|
|
|
private StreetMapper streetMapper;
|
|
|
|
// @Resource
|
|
|
|
|
|
|
|
// private StreetShelveMapper streetShelveMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private NettyClient nettyClient;
|
|
|
|
private NettyClient nettyClient;
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private StockMapper stockMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public Integer add(Street street) {
|
|
|
|
public Integer add(Street street) {
|
|
|
|
@ -122,28 +115,4 @@ public class StreetService {
|
|
|
|
return new PageInfo<>(streetVOS);
|
|
|
|
return new PageInfo<>(streetVOS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> shelvesByStreetId(Integer streetId) {
|
|
|
|
|
|
|
|
Street street = streetMapper.selectById(streetId);
|
|
|
|
|
|
|
|
if (street != null) {
|
|
|
|
|
|
|
|
return check(street);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void stockGenerate(String sheveId, Integer row, Integer column) {
|
|
|
|
|
|
|
|
List<Stock> stocks = new ArrayList<>(row * column);
|
|
|
|
|
|
|
|
for (int i = 1; i <= row; i++) {
|
|
|
|
|
|
|
|
for (int j = 1; j <= column; i++) {
|
|
|
|
|
|
|
|
Stock stock = new Stock();
|
|
|
|
|
|
|
|
stock.setStatus(0);
|
|
|
|
|
|
|
|
stock.setRow(i);
|
|
|
|
|
|
|
|
stock.setColumn(j);
|
|
|
|
|
|
|
|
stock.setShelveId(sheveId);
|
|
|
|
|
|
|
|
stocks.add(stock);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
stockMapper.batchInsert(stocks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|