Commit c169f7fb LN

空库位可以出库

1 个父辈 360128a7
......@@ -448,8 +448,8 @@ public class StoragePosController {
// throw new ValidateException("smfcore.error.getMaterialLot.out", "条码[{0}]验证失败,无法出库", new String[]{pos.getBarcode().getBarcode()});
// }
log.info("出库料仓【" + storage.getName() + "_" + storage.getCid() + "】位置仓位【" + pos.getPosName() + "】");
String outResult = taskService.checkout(storage, pos, isSingleOut,SecurityUtils.getCurrentUsername());
log.info("手动出库:出库料仓【" + storage.getName() + "_" + storage.getCid() + "】位置仓位【" + pos.getPosName() + "】");
String outResult = taskService.checkoutTest(storage, pos, isSingleOut,SecurityUtils.getCurrentUsername());
if (!Strings.isNullOrEmpty(outResult)) {
throw new ValidateException("smfcore.error", outResult);
}
......
......@@ -40,6 +40,13 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
msdAppendInfo.setMsl(barcode.getMsl());
msdAppendInfo.setOpenTime(barcode.getOpenTime());
msdAppendInfo.setThickness(barcode.getThickness());
}else{
setBarcode("");
setProviderNumber("");
setPartNumber("");
setNum(0);
setMemo("");
setBatchInfo("");
}
setCid(storage.getCid());
setStorageId(storage.getId());
......
......@@ -121,6 +121,25 @@ public class TaskService {
addTaskToExecute(task);
return "";
}
/**
* 库位出库 测试,空库位也可以出库
*/
public synchronized String checkoutTest(Storage storage, StoragePos pos, boolean isSingleOut, String opUserName) throws ValidateException {
DataLog task = new DataLog(storage, pos.getBarcode(), pos);
task.setType(OP.CHECKOUT);
task.setInOutType("0");
if(pos.getBarcode()!=null){
task.setPutInDate(pos.getBarcode().getPutInDate());
}
task.setStatus(OP_STATUS.WAIT.name());
task.setSingleOut(isSingleOut);
task.setOperator(opUserName);
addTaskToExecute(task);
return "";
}
public synchronized String checkout(Storage storage, StoragePos pos, boolean isSingleOut, String opUserName) throws ValidateException {
return checkout(storage,pos,isSingleOut,opUserName,"");
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!