|
|
|
@ -7,10 +7,7 @@ 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.config.ConfigProperties;
|
|
|
|
import com.zhehekeji.web.config.ConfigProperties;
|
|
|
|
import com.zhehekeji.web.entity.Stock;
|
|
|
|
import com.zhehekeji.web.entity.*;
|
|
|
|
import com.zhehekeji.web.entity.CheckLog;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.entity.StockLog;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.entity.Street;
|
|
|
|
|
|
|
|
import com.zhehekeji.web.mapper.CheckLogMapper;
|
|
|
|
import com.zhehekeji.web.mapper.CheckLogMapper;
|
|
|
|
import com.zhehekeji.web.mapper.StockLogMapper;
|
|
|
|
import com.zhehekeji.web.mapper.StockLogMapper;
|
|
|
|
import com.zhehekeji.web.mapper.StockMapper;
|
|
|
|
import com.zhehekeji.web.mapper.StockMapper;
|
|
|
|
@ -280,7 +277,7 @@ public class StockService {
|
|
|
|
stocks.forEach(stock -> {
|
|
|
|
stocks.forEach(stock -> {
|
|
|
|
StockExportExcel stockExportExcel = new StockExportExcel();
|
|
|
|
StockExportExcel stockExportExcel = new StockExportExcel();
|
|
|
|
stockExportExcel.setStreetName(street.getName());
|
|
|
|
stockExportExcel.setStreetName(street.getName());
|
|
|
|
stockExportExcel.setLotnum(stock.getLotnum());
|
|
|
|
stockExportExcel.setTrayCode(stock.getWmsTrayCode());
|
|
|
|
stockExportExcel.setDirection((stock.getDirection() == 1 ? "左侧" : "右侧")+"-"+(stock.getSide()==1?"浅货位":"深货位")+"-"+stock.getRow()+"层"+"-"+stock.getColumn()+"列");
|
|
|
|
stockExportExcel.setDirection((stock.getDirection() == 1 ? "左侧" : "右侧")+"-"+(stock.getSide()==1?"浅货位":"深货位")+"-"+stock.getRow()+"层"+"-"+stock.getColumn()+"列");
|
|
|
|
stockExportExcel.setWmsCategory(stock.getWmsCategory());
|
|
|
|
stockExportExcel.setWmsCategory(stock.getWmsCategory());
|
|
|
|
stockExportExcel.setCategory((stock.getCategory() == null||stock.getWmsCategory() == null) ? "无" : (stock.getWmsCategory().equals(stock.getCategory())?"一致":"不一致"));
|
|
|
|
stockExportExcel.setCategory((stock.getCategory() == null||stock.getWmsCategory() == null) ? "无" : (stock.getWmsCategory().equals(stock.getCategory())?"一致":"不一致"));
|
|
|
|
@ -320,7 +317,7 @@ public class StockService {
|
|
|
|
stocks.forEach(stock -> {
|
|
|
|
stocks.forEach(stock -> {
|
|
|
|
StockExportExcel stockExportExcel = new StockExportExcel();
|
|
|
|
StockExportExcel stockExportExcel = new StockExportExcel();
|
|
|
|
stockExportExcel.setStreetName(streetMap.get(stock.getStreetId()));
|
|
|
|
stockExportExcel.setStreetName(streetMap.get(stock.getStreetId()));
|
|
|
|
stockExportExcel.setLotnum(stock.getLotnum());
|
|
|
|
stockExportExcel.setTrayCode(stock.getWmsTrayCode());
|
|
|
|
stockExportExcel.setDirection((stock.getDirection() == 1 ? "左侧" : "右侧")+"-"+(stock.getSide()==1?"浅货位":"深货位")+"-"+stock.getRow()+"层"+"-"+stock.getColumn()+"列");
|
|
|
|
stockExportExcel.setDirection((stock.getDirection() == 1 ? "左侧" : "右侧")+"-"+(stock.getSide()==1?"浅货位":"深货位")+"-"+stock.getRow()+"层"+"-"+stock.getColumn()+"列");
|
|
|
|
stockExportExcel.setWmsCategory(stock.getWmsCategory());
|
|
|
|
stockExportExcel.setWmsCategory(stock.getWmsCategory());
|
|
|
|
stockExportExcel.setCategory((stock.getCategory() == null||stock.getWmsCategory() == null) ? "无" : (stock.getWmsCategory().equals(stock.getCategory())?"一致":"不一致"));
|
|
|
|
stockExportExcel.setCategory((stock.getCategory() == null||stock.getWmsCategory() == null) ? "无" : (stock.getWmsCategory().equals(stock.getCategory())?"一致":"不一致"));
|
|
|
|
@ -506,10 +503,10 @@ public class StockService {
|
|
|
|
|
|
|
|
|
|
|
|
stockQueryWrapper.eq("status","0").or().eq("status","1").or().eq("status","4")
|
|
|
|
stockQueryWrapper.eq("status","0").or().eq("status","1").or().eq("status","4")
|
|
|
|
.ne(ToolUtil.isNotEmpty(id),"id",id)
|
|
|
|
.ne(ToolUtil.isNotEmpty(id),"id",id)
|
|
|
|
.orderByDesc("export_time").last("limit 1");
|
|
|
|
.orderByDesc("export_time").orderByDesc("status").last("limit 1");
|
|
|
|
Stock stock =stockMapper.selectOne(stockQueryWrapper);
|
|
|
|
Stock stock =stockMapper.selectOne(stockQueryWrapper);
|
|
|
|
Street street = streetService.getById(stock.getStreetId());
|
|
|
|
Street street = streetService.getById(stock.getStreetId());
|
|
|
|
|
|
|
|
stock.setStreetName(street.getName());
|
|
|
|
|
|
|
|
|
|
|
|
String ip ="http://"+ street.getPlcIp()+":9002/pic/";
|
|
|
|
String ip ="http://"+ street.getPlcIp()+":9002/pic/";
|
|
|
|
if (stock.getPreoperationPic() != null&& stock.getPreoperationPic().length() > 0) {
|
|
|
|
if (stock.getPreoperationPic() != null&& stock.getPreoperationPic().length() > 0) {
|
|
|
|
@ -533,10 +530,14 @@ public class StockService {
|
|
|
|
public void truncateStock() {
|
|
|
|
public void truncateStock() {
|
|
|
|
stockMapper.truncate();
|
|
|
|
stockMapper.truncate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CategoryService categoryService;
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> getCategoryList() {
|
|
|
|
public Map<String,String> getCategoryList() {
|
|
|
|
|
|
|
|
List<Category> categoryList = categoryService.list();
|
|
|
|
|
|
|
|
Map<String,String> countLayersMap = categoryList.stream().collect(Collectors.toMap(Category::getCode, Category::getName));
|
|
|
|
|
|
|
|
|
|
|
|
return new ArrayList<>(countLayersMap.keySet());
|
|
|
|
return countLayersMap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|