|
|
|
|
@ -0,0 +1,384 @@
|
|
|
|
|
package com.zhehekeji.web.service;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.zhehekeji.web.entity.Stock;
|
|
|
|
|
import com.zhehekeji.web.entity.Street;
|
|
|
|
|
import com.zhehekeji.web.mapper.StockMapper;
|
|
|
|
|
import com.zhehekeji.web.pojo.stock.CheckStatus;
|
|
|
|
|
import com.zhehekeji.web.pojo.stock.RowColumnStatus;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class EmptyCheckService {
|
|
|
|
|
//
|
|
|
|
|
// @Resource
|
|
|
|
|
// private StreetService streetService;
|
|
|
|
|
// @Resource
|
|
|
|
|
// private StockMapper stockMapper;
|
|
|
|
|
// @Resource
|
|
|
|
|
// private CheckSummaryMapper checkSummaryMapper;
|
|
|
|
|
// @Resource
|
|
|
|
|
// private CheckStreetSummaryMapper checkStreetSummaryMapper;
|
|
|
|
|
// @Resource
|
|
|
|
|
// private EmptyCheckMapper emptyCheckMapper;
|
|
|
|
|
//
|
|
|
|
|
// public PageInfo<CheckSummary> checkSummaryPageInfo(EmptyCheckSearch emptyCheckSearch){
|
|
|
|
|
// PageHelper.startPage(emptyCheckSearch.getPageNum(),emptyCheckSearch.getPageSize());
|
|
|
|
|
// QueryWrapper<CheckSummary> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
// if(!StringUtils.isEmpty(emptyCheckSearch.getTaskId())){
|
|
|
|
|
// queryWrapper.eq("task_id",emptyCheckSearch.getTaskId());
|
|
|
|
|
// }
|
|
|
|
|
// if(emptyCheckSearch.getStartTime() != null ){
|
|
|
|
|
// queryWrapper.gt("start_time",emptyCheckSearch.getStartTime());
|
|
|
|
|
// }
|
|
|
|
|
// if(emptyCheckSearch.getEndTime() != null){
|
|
|
|
|
// queryWrapper.lt("start_time",emptyCheckSearch.getEndTime());
|
|
|
|
|
// }
|
|
|
|
|
// List<CheckSummary> checkSummaries = checkSummaryMapper.selectList(queryWrapper);
|
|
|
|
|
// return new PageInfo<>(checkSummaries);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public List<CheckStreetSummary> checkStreetSummaries(String taskId){
|
|
|
|
|
// return checkStreetSummaryMapper.list(taskId);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// /**
|
|
|
|
|
// * 盘点统计
|
|
|
|
|
// */
|
|
|
|
|
// public void CheckSummary(String SRMNumber,String taskId){
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(SRMNumber);
|
|
|
|
|
// if(street == null){
|
|
|
|
|
// log.error(" no SRMNumer:{}",SRMNumber);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// List<Stock> stockList = stockMapper.selectList(new QueryWrapper<Stock>().eq("street_id",street.getId()));
|
|
|
|
|
// /**
|
|
|
|
|
// * 空货位的数量
|
|
|
|
|
// */
|
|
|
|
|
// Integer emptyCount = 0;
|
|
|
|
|
//
|
|
|
|
|
// /**
|
|
|
|
|
// * 空托盘的数量(只有托盘没有货物)
|
|
|
|
|
// */
|
|
|
|
|
// Integer emptyGoodsCount = 0;
|
|
|
|
|
//
|
|
|
|
|
// /**
|
|
|
|
|
// * 有货物的数量
|
|
|
|
|
// */
|
|
|
|
|
// Integer goodsCount = 0;
|
|
|
|
|
// for(Stock stock: stockList){
|
|
|
|
|
// if(stock.getEmptyStatus() == 3){
|
|
|
|
|
// //没托盘
|
|
|
|
|
// emptyCount++;
|
|
|
|
|
// }else if(stock.getEmptyStatus() == 2){
|
|
|
|
|
// //有货物
|
|
|
|
|
// goodsCount++;
|
|
|
|
|
// }else if(stock.getEmptyStatus() == 1){
|
|
|
|
|
// //有托盘 没货物
|
|
|
|
|
// emptyGoodsCount++;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// //更新盘点统计
|
|
|
|
|
// List<CheckStreetSummary> checkStreetSummaries = checkStreetSummaryMapper.selectList(new QueryWrapper<CheckStreetSummary>().eq("street_id",street.getId()).eq("lotnum",taskId));
|
|
|
|
|
// if(checkStreetSummaries.size() > 0){
|
|
|
|
|
// CheckStreetSummary checkStreetSummary = checkStreetSummaries.get(0);
|
|
|
|
|
// checkStreetSummary.setStreetId(street.getId());
|
|
|
|
|
// checkStreetSummary.setEmptyCount(emptyCount);
|
|
|
|
|
// checkStreetSummary.setEmptyGoodsCount(emptyGoodsCount);
|
|
|
|
|
// checkStreetSummary.setGoodsCount(goodsCount);
|
|
|
|
|
// checkStreetSummary.setEndTime(LocalDateTime.now());
|
|
|
|
|
// checkStreetSummaryMapper.updateById(checkStreetSummary);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// /**
|
|
|
|
|
// * 空托盘检测 按行开始
|
|
|
|
|
// * @param
|
|
|
|
|
// */
|
|
|
|
|
// public void emptyCheckStart(String SRMNUmber,String taskId){
|
|
|
|
|
// log.info("空托盘检测 按行开始,SRMNUmber:{},taskNo:{}",SRMNUmber,taskId);
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(SRMNUmber);
|
|
|
|
|
// if(street == null){
|
|
|
|
|
// log.error(" no SRMNumer:{}",SRMNUmber);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// CheckSummary checkSummary = checkSummaryMapper.selectById(taskId);
|
|
|
|
|
// if(checkSummary == null){
|
|
|
|
|
// checkSummary = new CheckSummary();
|
|
|
|
|
// checkSummary.setTaskId(taskId);
|
|
|
|
|
// checkSummary.setStartTime(LocalDateTime.now());
|
|
|
|
|
// checkSummaryMapper.insert(checkSummary);
|
|
|
|
|
// }
|
|
|
|
|
// Map<String,Object> map = new HashMap<>();
|
|
|
|
|
// //将这些位置的旧数据清空
|
|
|
|
|
// UpdateWrapper<EmptyCheck> wrapper = new UpdateWrapper<>();
|
|
|
|
|
//// wrapper.eq("street_id",street.getId()).eq("`row`",row).ge("`column`",startColumn).le("`column`",endColumn);
|
|
|
|
|
// emptyCheckMapper.delete(wrapper);
|
|
|
|
|
// //新增空的盘点统计
|
|
|
|
|
// List<CheckStreetSummary> checkStreetSummaries = checkStreetSummaryMapper.selectList(new QueryWrapper<CheckStreetSummary>().eq("street_id",street.getId()).eq("task_id",taskId));
|
|
|
|
|
// if(checkStreetSummaries.size() == 0){
|
|
|
|
|
// log.info("新增盘点统计,SRMNUmber:{},taskNo:{}",SRMNUmber,taskId);
|
|
|
|
|
// CheckStreetSummary checkStreetSummary = new CheckStreetSummary();
|
|
|
|
|
// checkStreetSummary.setTaskId(taskId);
|
|
|
|
|
// checkStreetSummary.setStartTime(LocalDateTime.now());
|
|
|
|
|
// checkStreetSummary.setStreetId(street.getId());
|
|
|
|
|
// checkStreetSummary.setEmptyCount(0);
|
|
|
|
|
// checkStreetSummary.setGoodsCount(0);
|
|
|
|
|
// checkStreetSummary.setEmptyGoodsCount(0);
|
|
|
|
|
// checkStreetSummaryMapper.insert(checkStreetSummary);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void updateEmptyCheckLastTime(String taskId,String SRMNumber){
|
|
|
|
|
// CheckSummary checkSummary = new CheckSummary();
|
|
|
|
|
// checkSummary.setTaskId(taskId);
|
|
|
|
|
// checkSummary.setEndTime(LocalDateTime.now());
|
|
|
|
|
// checkSummaryMapper.updateById(checkSummary);
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(SRMNumber);
|
|
|
|
|
//
|
|
|
|
|
// if(street != null){
|
|
|
|
|
// CheckStreetSummary checkStreetSummary = checkStreetSummaryMapper.get(street.getId(),taskId);
|
|
|
|
|
// Integer count = emptyCheckMapper.selectCount(new QueryWrapper<EmptyCheck>().eq("task_id",taskId).eq("street_id",street.getId()).eq("empty_status",1));
|
|
|
|
|
// checkStreetSummary.setEmptyCount(count);
|
|
|
|
|
// checkStreetSummary.setEndTime(LocalDateTime.now());
|
|
|
|
|
// checkStreetSummaryMapper.updateEmptyCount(street.getId(),taskId,count);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void updateCheckLastTime(String taskId,String SRMNumber,String goodsCode){
|
|
|
|
|
// CheckSummary checkSummary = new CheckSummary();
|
|
|
|
|
// checkSummary.setTaskId(taskId);
|
|
|
|
|
// checkSummary.setEndTime(LocalDateTime.now());
|
|
|
|
|
// checkSummaryMapper.updateById(checkSummary);
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(SRMNumber);
|
|
|
|
|
//
|
|
|
|
|
// if(street != null){
|
|
|
|
|
// CheckStreetSummary checkStreetSummary = checkStreetSummaryMapper.get(street.getId(),taskId);
|
|
|
|
|
// //托盤組 11111111
|
|
|
|
|
// int c = checkStreetSummary.getGoodsCount() + 1;
|
|
|
|
|
// checkStreetSummaryMapper.updateGoodsCount(street.getId(),taskId,c);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// 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));
|
|
|
|
|
// Map<Integer,EmptyCheck> stockMap = new HashMap<>(emptyChecks.size()*2);
|
|
|
|
|
// emptyChecks.forEach(stock -> {
|
|
|
|
|
// stockMap.put(stock.getColumn(),stock);
|
|
|
|
|
// });
|
|
|
|
|
// //int columns = side == 1?street.getLeftColumn():street.getRightColumn();
|
|
|
|
|
// StringBuffer sb = new StringBuffer();
|
|
|
|
|
// for(int i = startColumn;i<=endColumn;i++){
|
|
|
|
|
// if(stockMap.get(i) != null && stockMap.get(i).getEmptyStatus() == 2){
|
|
|
|
|
// sb.append(1);
|
|
|
|
|
// }else {
|
|
|
|
|
// sb.append(0);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// log.info("【空货位盘点结果】streetId:{},leftright:{},side:{},row:{},startColumn:{},endColumn:{},emptyStatus:{}",streetId,leftRight,side,row,startColumn,endColumn,sb);
|
|
|
|
|
// return sb.toString();
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public Map<String,String> getAllEmptyStatus(String SRMNUmber,Integer row,Integer startColumn,Integer endColumn){
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(SRMNUmber);
|
|
|
|
|
// if(street == null){
|
|
|
|
|
// return null;
|
|
|
|
|
// }
|
|
|
|
|
// Map<String,String> map = new HashMap<>();
|
|
|
|
|
// //判断单双货架
|
|
|
|
|
// String L01 = getEmptyStatus(street.getId(),1,1,row,startColumn,endColumn);
|
|
|
|
|
// map.put("L01",L01);
|
|
|
|
|
// String R01 = getEmptyStatus(street.getId(),1,2,row,startColumn,endColumn);
|
|
|
|
|
// map.put("R01",R01);
|
|
|
|
|
// if(street.getLeftType() == 1){
|
|
|
|
|
// //双伸的
|
|
|
|
|
// String L02 = getEmptyStatus(street.getId(),2,1,row,startColumn,endColumn);
|
|
|
|
|
// map.put("L02",L02);
|
|
|
|
|
// }
|
|
|
|
|
// if(street.getRightType() == 1){
|
|
|
|
|
// String R02 = getEmptyStatus(street.getId(),2,2,row,startColumn,endColumn);
|
|
|
|
|
// map.put("R02",R02);
|
|
|
|
|
// }
|
|
|
|
|
// return map;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void emptyCheckLog(ECTransmission ecTransmission){
|
|
|
|
|
// Street street = streetService.getStreetByPlcId(ecTransmission.getSRMNumber());
|
|
|
|
|
// if(street == null){
|
|
|
|
|
// log.error(" no SRMNumer:{}",ecTransmission.getSRMNumber());
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// EmptyCheck emptyCheck = emptyCheckMapper.getOne(street.getId(),ecTransmission.getDirection(),ecTransmission.getSide(),ecTransmission.getRow(),ecTransmission.getColumn());
|
|
|
|
|
//
|
|
|
|
|
// if(emptyCheck == null){
|
|
|
|
|
// emptyCheck = new EmptyCheck();
|
|
|
|
|
// emptyCheck.setStreetId(street.getId());
|
|
|
|
|
// emptyCheck.setOrderNum(ecTransmission.getTaskId());
|
|
|
|
|
// emptyCheck.setSide(ecTransmission.getSide());
|
|
|
|
|
// emptyCheck.setDirection(ecTransmission.getDirection());
|
|
|
|
|
// //0:未盘点 1:有货 2:无货
|
|
|
|
|
// if(ecTransmission.getIsEmpty().equals("0")){
|
|
|
|
|
// emptyCheck.setEmptyStatus(2);
|
|
|
|
|
// }else {
|
|
|
|
|
// emptyCheck.setEmptyStatus(1);
|
|
|
|
|
// }
|
|
|
|
|
// emptyCheck.setRow(ecTransmission.getRow());
|
|
|
|
|
// emptyCheck.setColumn(ecTransmission.getColumn());
|
|
|
|
|
// }else {
|
|
|
|
|
// emptyCheck.setOrderNum(ecTransmission.getTaskId());
|
|
|
|
|
// if(ecTransmission.getIsEmpty().equals("0")){
|
|
|
|
|
// log.info("goodsLocation:{}, status: {}", ecTransmission.getGoodsLocation(), ecTransmission.getIsEmpty());
|
|
|
|
|
// emptyCheck.setEmptyStatus(2);
|
|
|
|
|
// }else {
|
|
|
|
|
// log.info("goodsLocation:{}, status: {}", ecTransmission.getGoodsLocation(), ecTransmission.getIsEmpty());
|
|
|
|
|
// emptyCheck.setEmptyStatus(1);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// emptyCheckMapper.insertOrUpdate(emptyCheck);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public CheckStatus emptyStatusByRowColumn(RowColumnStatus rowColumnStatus){
|
|
|
|
|
// CheckStatus checkStatus = new CheckStatus();
|
|
|
|
|
// checkStatus.setColumnStart(rowColumnStatus.getColumnStart());
|
|
|
|
|
// checkStatus.setColumnEnd(rowColumnStatus.getColumnEnd());
|
|
|
|
|
// checkStatus.setRowStart(rowColumnStatus.getRowStart());
|
|
|
|
|
// checkStatus.setRowEnd(rowColumnStatus.getRowEnd());
|
|
|
|
|
//
|
|
|
|
|
// List<EmptyCheck>stockList = new ArrayList<>();
|
|
|
|
|
// //默认全部盘点正确
|
|
|
|
|
// Map<String,Integer> rowTabStatus = new LinkedHashMap<>();
|
|
|
|
|
// int columns = 0;
|
|
|
|
|
// int rows = 0;
|
|
|
|
|
// for(String rowTab: rowColumnStatus.getRowTabs()){
|
|
|
|
|
// rows = getMax(rowTab,rows);
|
|
|
|
|
// rowTabStatus.put(rowTab,0);
|
|
|
|
|
// }
|
|
|
|
|
// Map<String,Integer> columnTabStatus = new LinkedHashMap<>();
|
|
|
|
|
// for(String column:rowColumnStatus.getColumnTabs()){
|
|
|
|
|
// columns = getMax(column,columns);
|
|
|
|
|
// columnTabStatus.put(column,0);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// 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)){
|
|
|
|
|
// stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stocks);
|
|
|
|
|
// checkStatus.setEmptyStatus(stocks);
|
|
|
|
|
// checkStatus.setRowTabStatus(rowTabStatus);
|
|
|
|
|
// checkStatus.setColumnTabStatus(columnTabStatus);
|
|
|
|
|
// return checkStatus;
|
|
|
|
|
// }
|
|
|
|
|
// for(EmptyCheck emptyCheck: stocks){
|
|
|
|
|
// if(emptyCheck.getEmptyStatus() == null){
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// if(emptyCheck.getColumn()>= rowColumnStatus.getColumnStart() && emptyCheck.getColumn()<= rowColumnStatus.getColumnEnd() && emptyCheck.getRow() >= rowColumnStatus.getRowStart() && emptyCheck.getRow()<= rowColumnStatus.getRowEnd()){
|
|
|
|
|
// stockList.add(emptyCheck);
|
|
|
|
|
// }
|
|
|
|
|
// if(!CollectionUtils.isEmpty(rowColumnStatus.getRowTabs())){
|
|
|
|
|
// for(String rowTab: rowColumnStatus.getRowTabs()){
|
|
|
|
|
// if(isRowColumnInTab(emptyCheck,rowTab,true)){
|
|
|
|
|
// tabStatus(emptyCheck,rowTabStatus,rowTab);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if(!CollectionUtils.isEmpty(rowColumnStatus.getColumnTabs())){
|
|
|
|
|
// for(String columnTab: rowColumnStatus.getColumnTabs()){
|
|
|
|
|
// if(isRowColumnInTab(emptyCheck,columnTab,false)){
|
|
|
|
|
// tabStatus(emptyCheck,columnTabStatus,columnTab);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// checkStatus.setColumnTabStatus(columnTabStatus);
|
|
|
|
|
// checkStatus.setRowTabStatus(rowTabStatus);
|
|
|
|
|
// checkStatus.setEmptyStatus(stockInit(rowColumnStatus.getRowStart(), rowColumnStatus.getRowEnd(), rowColumnStatus.getColumnStart(), rowColumnStatus.getColumnEnd(), null,stockList));
|
|
|
|
|
// return checkStatus;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// private List<EmptyCheck> stockInit(Integer rowStart, Integer rowEnd,Integer columnStart,Integer columnEnd,String shelveId,List<EmptyCheck> readyList){
|
|
|
|
|
// Map<Integer,Map<Integer,Boolean>> map = new HashMap<>();
|
|
|
|
|
// readyList.forEach(stock -> {
|
|
|
|
|
// if(map.get(stock.getRow()) == null){
|
|
|
|
|
// Map<Integer,Boolean> columnMap = new HashMap<>();
|
|
|
|
|
// columnMap.put(stock.getColumn(),true);
|
|
|
|
|
// map.put(stock.getRow(),columnMap);
|
|
|
|
|
// }else {
|
|
|
|
|
// Map<Integer,Boolean> columnMap = map.get(stock.getRow());
|
|
|
|
|
// if(columnMap.get(stock.getColumn()) == null){
|
|
|
|
|
// columnMap.put(stock.getColumn(),true);
|
|
|
|
|
// }
|
|
|
|
|
// map.put(stock.getRow(),columnMap);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
// for(int i = rowStart;i<=rowEnd;i++){
|
|
|
|
|
// Map<Integer,Boolean> columnMap = map.get(i);
|
|
|
|
|
// for(int j = columnStart;j<=columnEnd;j++){
|
|
|
|
|
// if(columnMap == null || columnMap.get(j) == null){
|
|
|
|
|
// EmptyCheck emptyCheck = new EmptyCheck();
|
|
|
|
|
// emptyCheck.setColumn(j);
|
|
|
|
|
// emptyCheck.setRow(i);
|
|
|
|
|
// emptyCheck.setEmptyStatus(0);
|
|
|
|
|
// //stock.setShelveId(shelveId);
|
|
|
|
|
// readyList.add(emptyCheck);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return readyList;
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //0:未知 1:空 2:非空
|
|
|
|
|
// //未知 > 空 > 非空
|
|
|
|
|
// private void tabStatus(EmptyCheck stock,Map<String,Integer> tabStatus,String tab){
|
|
|
|
|
// if(tabStatus.get(tab) == null){
|
|
|
|
|
// tabStatus.put(tab,stock.getEmptyStatus());
|
|
|
|
|
// }else {
|
|
|
|
|
// Integer status = tabStatus.get(tab);
|
|
|
|
|
// if(stock.getEmptyStatus() == 0){
|
|
|
|
|
// //未知为最优先状态
|
|
|
|
|
// tabStatus.put(tab,0);
|
|
|
|
|
// }else if(stock.getEmptyStatus() == 1 && status != 0) {
|
|
|
|
|
// tabStatus.put(tab, 1);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// private Boolean isRowColumnInTab(EmptyCheck stock,String tab,Boolean isRow){
|
|
|
|
|
// String [] strings = tab.split(" - ");
|
|
|
|
|
// Integer tabStart = Integer.valueOf(strings[0]);
|
|
|
|
|
// Integer tabEnd = Integer.valueOf(strings[1]);
|
|
|
|
|
// if(isRow){
|
|
|
|
|
// return stock.getRow() >= tabStart && stock.getRow() <= tabEnd;
|
|
|
|
|
// }else {
|
|
|
|
|
// return stock.getColumn() >= tabStart && stock.getColumn() <= tabEnd;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public Integer getMax(String tab,Integer max){
|
|
|
|
|
// String [] strings = tab.split(" - ");
|
|
|
|
|
// Integer tabStart = Integer.valueOf(strings[0]);
|
|
|
|
|
// Integer tabEnd = Integer.valueOf(strings[1]);
|
|
|
|
|
// int a = tabStart > tabEnd ? tabStart : tabEnd;
|
|
|
|
|
// a = max > a ? max : a;
|
|
|
|
|
// return a;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|