|
|
|
|
@ -307,11 +307,11 @@ public class StockService {
|
|
|
|
|
Stock stock = stockInfo(stockCheck);
|
|
|
|
|
Assert.isTrue(stock != null && stock.getId() != null, "該貨位暫時沒有記錄");
|
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
|
if(StockStatus.SUCCESS.getStatus().equals(oldStatus)){
|
|
|
|
|
return stock;
|
|
|
|
|
}
|
|
|
|
|
Assert.isTrue(StockStatus.ERROR.getStatus().equals(oldStatus), "無需核對");
|
|
|
|
|
|
|
|
|
|
log.info("check stock correct, shelveID:{},row:{},column:{}", stockCheck.getShelveId(), stockCheck.getRow(), stockCheck.getColumn());
|
|
|
|
|
stock.setStatus(StockStatus.SUCCESS.getStatus());
|
|
|
|
|
|
|
|
|
|
stock.setStatus(StockStatus.MANUAL.getStatus());
|
|
|
|
|
stockMapper.updateById(stock);
|
|
|
|
|
checkLog(stock);
|
|
|
|
|
return stock;
|
|
|
|
|
@ -322,6 +322,10 @@ public class StockService {
|
|
|
|
|
|
|
|
|
|
private void checkLog(Stock stock){
|
|
|
|
|
CheckLog checkLog = new CheckLog();
|
|
|
|
|
|
|
|
|
|
checkLog.setRow(stock.getRow());
|
|
|
|
|
checkLog.setColumn(stock.getColumn());
|
|
|
|
|
|
|
|
|
|
checkLog.setCheckNum(stock.getCheckNum());
|
|
|
|
|
checkLog.setPic(stock.getCheckPic());
|
|
|
|
|
checkLog.setShelveId(stock.getShelveId());
|
|
|
|
|
|