|
|
|
@ -175,20 +175,12 @@ public class EmptyCheckService {
|
|
|
|
//托盤組 11111111
|
|
|
|
//托盤組 11111111
|
|
|
|
int c = checkStreetSummary.getGoodsCount() + 1;
|
|
|
|
int c = checkStreetSummary.getGoodsCount() + 1;
|
|
|
|
checkStreetSummaryMapper.updateGoodsCount(street.getId(),taskId,c);
|
|
|
|
checkStreetSummaryMapper.updateGoodsCount(street.getId(),taskId,c);
|
|
|
|
// if(goodsCode.equals("11111111")){
|
|
|
|
|
|
|
|
// int c = checkStreetSummary.getEmptyGoodsCount() + 1;
|
|
|
|
|
|
|
|
// checkStreetSummaryMapper.updateEmptyGoodsCount(street.getId(),taskId,c);
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getEmptyStatus(Integer streetId,Integer side,Integer leftRight,Integer row,Integer startColumn,Integer endColumn){
|
|
|
|
public String getEmptyStatus(Integer streetId,Integer side,Integer leftRight,Integer row,Integer startColumn,Integer endColumn){
|
|
|
|
|
|
|
|
|
|
|
|
List<EmptyCheck> emptyChecks = emptyCheckMapper.selectList(new QueryWrapper<EmptyCheck>().eq("`row`",row).eq("street_id",streetId).eq("direction",leftRight).eq("side",side).ge("`column`",startColumn).le("`column`",endColumn));
|
|
|
|
List<EmptyCheck> emptyChecks = emptyCheckMapper.selectList(new QueryWrapper<EmptyCheck>().eq("`row`",row).eq("street_id",streetId).eq("direction",leftRight).eq("side",side).ge("`column`",startColumn).le("`column`",endColumn));
|
|
|
|
//List<Stock> stockList = stockMapper.selectList(new QueryWrapper<Stock>().eq("`row`",row).eq("street_id",street.getId()).eq("direction",leftRight).eq("side",side));
|
|
|
|
|
|
|
|
Map<Integer,EmptyCheck> stockMap = new HashMap<>(emptyChecks.size()*2);
|
|
|
|
Map<Integer,EmptyCheck> stockMap = new HashMap<>(emptyChecks.size()*2);
|
|
|
|
emptyChecks.forEach(stock -> {
|
|
|
|
emptyChecks.forEach(stock -> {
|
|
|
|
stockMap.put(stock.getColumn(),stock);
|
|
|
|
stockMap.put(stock.getColumn(),stock);
|
|
|
|
@ -270,8 +262,6 @@ public class EmptyCheckService {
|
|
|
|
checkStatus.setColumnEnd(rowColumnStatus.getColumnEnd());
|
|
|
|
checkStatus.setColumnEnd(rowColumnStatus.getColumnEnd());
|
|
|
|
checkStatus.setRowStart(rowColumnStatus.getRowStart());
|
|
|
|
checkStatus.setRowStart(rowColumnStatus.getRowStart());
|
|
|
|
checkStatus.setRowEnd(rowColumnStatus.getRowEnd());
|
|
|
|
checkStatus.setRowEnd(rowColumnStatus.getRowEnd());
|
|
|
|
//checkStatus.setShelveId(rowColumnStatus.getShelveId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<EmptyCheck>stockList = new ArrayList<>();
|
|
|
|
List<EmptyCheck>stockList = new ArrayList<>();
|
|
|
|
//默认全部盘点正确
|
|
|
|
//默认全部盘点正确
|
|
|
|
@ -287,8 +277,7 @@ public class EmptyCheckService {
|
|
|
|
columns = getMax(column,columns);
|
|
|
|
columns = getMax(column,columns);
|
|
|
|
columnTabStatus.put(column,0);
|
|
|
|
columnTabStatus.put(column,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Map<String,Integer> columnTabCorrectCount = new LinkedHashMap<>();
|
|
|
|
|
|
|
|
Map<String,Integer> rowTabCorrectCount = new LinkedHashMap<>();
|
|
|
|
|
|
|
|
List<EmptyCheck> stocks = emptyCheckMapper.selectList(new QueryWrapper<EmptyCheck>().select("empty_status","`row`","`column`").eq("`street_id`",rowColumnStatus.getStreetId()).eq("direction",rowColumnStatus.getDirection()).eq("side",rowColumnStatus.getSide()));
|
|
|
|
List<EmptyCheck> stocks = emptyCheckMapper.selectList(new QueryWrapper<EmptyCheck>().select("empty_status","`row`","`column`").eq("`street_id`",rowColumnStatus.getStreetId()).eq("direction",rowColumnStatus.getDirection()).eq("side",rowColumnStatus.getSide()));
|
|
|
|
if(CollectionUtils.isEmpty(stocks)){
|
|
|
|
if(CollectionUtils.isEmpty(stocks)){
|
|
|
|
stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stocks);
|
|
|
|
stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stocks);
|
|
|
|
@ -308,15 +297,6 @@ public class EmptyCheckService {
|
|
|
|
for(String rowTab: rowColumnStatus.getRowTabs()){
|
|
|
|
for(String rowTab: rowColumnStatus.getRowTabs()){
|
|
|
|
if(isRowColumnInTab(emptyCheck,rowTab,true)){
|
|
|
|
if(isRowColumnInTab(emptyCheck,rowTab,true)){
|
|
|
|
tabStatus(emptyCheck,rowTabStatus,rowTab);
|
|
|
|
tabStatus(emptyCheck,rowTabStatus,rowTab);
|
|
|
|
|
|
|
|
|
|
|
|
// if(emptyCheck.getEmptyStatus() != 0 && emptyCheck.getEmptyStatus() != 1){
|
|
|
|
|
|
|
|
// if(rowTabCorrectCount.get(rowTab) == null){
|
|
|
|
|
|
|
|
// rowTabCorrectCount.put(rowTab,1);
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// int c = rowTabCorrectCount.get(rowTab);
|
|
|
|
|
|
|
|
// rowTabCorrectCount.put(rowTab,c+1);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -324,38 +304,11 @@ public class EmptyCheckService {
|
|
|
|
for(String columnTab: rowColumnStatus.getColumnTabs()){
|
|
|
|
for(String columnTab: rowColumnStatus.getColumnTabs()){
|
|
|
|
if(isRowColumnInTab(emptyCheck,columnTab,false)){
|
|
|
|
if(isRowColumnInTab(emptyCheck,columnTab,false)){
|
|
|
|
tabStatus(emptyCheck,columnTabStatus,columnTab);
|
|
|
|
tabStatus(emptyCheck,columnTabStatus,columnTab);
|
|
|
|
// if(emptyCheck.getEmptyStatus() != 0 && emptyCheck.getEmptyStatus() != 1){
|
|
|
|
|
|
|
|
// if(columnTabCorrectCount.get(columnTab) == null){
|
|
|
|
|
|
|
|
// columnTabCorrectCount.put(columnTab,1);
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// int c = columnTabCorrectCount.get(columnTab);
|
|
|
|
|
|
|
|
// columnTabCorrectCount.put(columnTab,c+1);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// for(Map.Entry<String,Integer> entry: rowTabCorrectCount.entrySet()){
|
|
|
|
|
|
|
|
// String [] strings = entry.getKey().split(" - ");
|
|
|
|
|
|
|
|
// Integer tabStart = Integer.valueOf(strings[0]);
|
|
|
|
|
|
|
|
// Integer tabEnd = Integer.valueOf(strings[1]);
|
|
|
|
|
|
|
|
// int counts = (tabEnd- tabStart + 1) * rows;
|
|
|
|
|
|
|
|
// if(counts == entry.getValue()){
|
|
|
|
|
|
|
|
// rowTabStatus.put(entry.getKey(),2);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// for(Map.Entry<String,Integer> entry: columnTabCorrectCount.entrySet()){
|
|
|
|
|
|
|
|
// String [] strings = entry.getKey().split(" - ");
|
|
|
|
|
|
|
|
// Integer tabStart = Integer.valueOf(strings[0]);
|
|
|
|
|
|
|
|
// Integer tabEnd = Integer.valueOf(strings[1]);
|
|
|
|
|
|
|
|
// int counts = (tabEnd- tabStart + 1) * rows;
|
|
|
|
|
|
|
|
// if(counts == entry.getValue()){
|
|
|
|
|
|
|
|
// columnTabStatus.put(entry.getKey(),2);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkStatus.setColumnTabStatus(columnTabStatus);
|
|
|
|
checkStatus.setColumnTabStatus(columnTabStatus);
|
|
|
|
checkStatus.setRowTabStatus(rowTabStatus);
|
|
|
|
checkStatus.setRowTabStatus(rowTabStatus);
|
|
|
|
checkStatus.setEmptyStatus(stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stockList));
|
|
|
|
checkStatus.setEmptyStatus(stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stockList));
|
|
|
|
|