|
|
|
|
@ -84,6 +84,32 @@ public class StockService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
// 示例main函数,用于读取指定文件并将每行中含有"time:"的部分提取出来
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String filePath ="E:\\m\\duoji-web-info.log";
|
|
|
|
|
System.out.println("正在读取文件: " + filePath);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
java.nio.file.Path path = java.nio.file.Paths.get(filePath);
|
|
|
|
|
java.nio.file.Files.lines(path)
|
|
|
|
|
.filter(line -> line.contains("time:"))
|
|
|
|
|
.forEach(line -> {
|
|
|
|
|
int startIndex = line.indexOf("time:") + 5; // "time:"的长度是5
|
|
|
|
|
// 提取"time:"后面的内容
|
|
|
|
|
String timeValue = line.substring(startIndex).trim();
|
|
|
|
|
// 去除millisecond
|
|
|
|
|
timeValue = timeValue.replace("millisecond","");
|
|
|
|
|
if (Integer.valueOf(timeValue) > 4000)
|
|
|
|
|
System.out.println(timeValue);
|
|
|
|
|
});
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
System.err.println("读取文件时发生错误: " + e.getMessage());
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CheckStatus statusByRowColumn(RowColumnStatus rowColumnStatus){
|
|
|
|
|
CheckStatus checkStatus = new CheckStatus();
|
|
|
|
|
checkStatus.setColumnStart(rowColumnStatus.getColumnStart());
|
|
|
|
|
@ -109,7 +135,7 @@ public class StockService {
|
|
|
|
|
}
|
|
|
|
|
Map<String,Integer> columnTabCorrectCount = new LinkedHashMap<>();
|
|
|
|
|
Map<String,Integer> rowTabCorrectCount = new LinkedHashMap<>();
|
|
|
|
|
List<Stock> stocks = stockMapper.selectList(new QueryWrapper<Stock>().select("status","`row`","`column`","tray_code").eq("`street_id`",rowColumnStatus.getStreetId()).eq("direction",rowColumnStatus.getDirection()).eq("side",rowColumnStatus.getSide()));
|
|
|
|
|
List<Stock> stocks = stockMapper.selectList(new QueryWrapper<Stock>().select("id","status","`row`","`column`","tray_code","wms_tray_code").eq("`street_id`",rowColumnStatus.getStreetId()).eq("direction",rowColumnStatus.getDirection()).eq("side",rowColumnStatus.getSide()));
|
|
|
|
|
if(CollectionUtils.isEmpty(stocks)){
|
|
|
|
|
stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stocks);
|
|
|
|
|
checkStatus.setStocks(stocks);
|
|
|
|
|
@ -361,7 +387,13 @@ public class StockService {
|
|
|
|
|
* @param stockCheck
|
|
|
|
|
*/
|
|
|
|
|
public Stock checkCorrect(StockCheck stockCheck) {
|
|
|
|
|
Stock stock = stockInfo(stockCheck);
|
|
|
|
|
|
|
|
|
|
Stock stock = null;
|
|
|
|
|
if (stockCheck.getId() != null){
|
|
|
|
|
stock = stockMapper.selectById(stockCheck.getId());
|
|
|
|
|
}else {
|
|
|
|
|
stockInfo(stockCheck);
|
|
|
|
|
}
|
|
|
|
|
Assert.isTrue(stock != null && stock.getId() != null, "该货位暂时没有记录");
|
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
|
//Assert.isTrue(StockStatus.ERROR.getStatus().equals(oldStatus), "无需核对");
|
|
|
|
|
|