|
|
|
@ -42,7 +42,7 @@ public class StockService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
EasyExcel.read(file.getInputStream(), StockExcel.class, new StockImport(stockMapper)).sheet().doRead();
|
|
|
|
EasyExcel.read(file.getInputStream(), StockExcel.class, new StockImport(stockMapper)).sheet().doRead();
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
Assert.isTrue(false,"导入出错");
|
|
|
|
Assert.isTrue(false,"導入出錯");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -305,7 +305,7 @@ public class StockService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Stock checkCorrect(StockCheck stockCheck) {
|
|
|
|
public Stock checkCorrect(StockCheck stockCheck) {
|
|
|
|
Stock stock = stockInfo(stockCheck);
|
|
|
|
Stock stock = stockInfo(stockCheck);
|
|
|
|
Assert.isTrue(stock != null && stock.getId() != null, "该货位暂时没有记录");
|
|
|
|
Assert.isTrue(stock != null && stock.getId() != null, "該貨位暫時沒有記錄");
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
if(StockStatus.SUCCESS.getStatus().equals(oldStatus)){
|
|
|
|
if(StockStatus.SUCCESS.getStatus().equals(oldStatus)){
|
|
|
|
return stock;
|
|
|
|
return stock;
|
|
|
|
@ -339,9 +339,9 @@ public class StockService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Stock checkByMan(CheckByMan checkByMan) {
|
|
|
|
public Stock checkByMan(CheckByMan checkByMan) {
|
|
|
|
Stock stock = stockMapper.getByShelveIdAndRowColumn(checkByMan.getShelveId(), checkByMan.getRow(), checkByMan.getColumn());
|
|
|
|
Stock stock = stockMapper.getByShelveIdAndRowColumn(checkByMan.getShelveId(), checkByMan.getRow(), checkByMan.getColumn());
|
|
|
|
Assert.notNull(stock, "该货位暂时没有记录");
|
|
|
|
Assert.notNull(stock, "該貨位暫時沒有記錄");
|
|
|
|
Boolean same = checkByMan.getCategory().equals(stock.getCategory()) && checkByMan.getCount().equals(stock.getCount());
|
|
|
|
Boolean same = checkByMan.getCategory().equals(stock.getCategory()) && checkByMan.getCount().equals(stock.getCount());
|
|
|
|
Assert.isTrue(!same, "品规和数量与原有记录相同");
|
|
|
|
Assert.isTrue(!same, "品規、數量與原有紀錄相同");
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
Integer oldStatus = stock.getStatus();
|
|
|
|
String oldCategory = stock.getCategory();
|
|
|
|
String oldCategory = stock.getCategory();
|
|
|
|
Integer count = stock.getCount();
|
|
|
|
Integer count = stock.getCount();
|
|
|
|
|