import java.util.Scanner;
class WarehouseInformation {
private String itemno;
private String itemname;
private String suppliername;
private String warehousingtime;
private String shipmenttime;
private String warehousenumber;
private String warehouseplace;
private int itemnumber;
private int outnumber;
public String getItemno() {
return itemno;
}
public void setItemno(String itemno) {
this.itemno = itemno;
}
public String getItemname() {
return itemname;
}
public void setItemname(String itemname) {
this.itemname = itemname;
}
public String getSuppliername() {
return suppliername;
}
public void setSuppliername(String suppliername) {
this.suppliername = suppliername;
}
public String getWarehousingtime() {
return warehousingtime;
}
public void setWarehousingtime(String warehousingtime) {
this.warehousingtime = warehousingtime;
}
public String getShipmenttime() {
return shipmenttime;
}
public void setShipmenttime(String shipmenttime) {
this.shipmenttime = shipmenttime;
}
public String getWarehousenumber() {
return warehousenumber;
}
public void setWarehousenumber(String warehousenumber) {
this.warehousenumber = warehousenumber;
}
public String getWarehouseplace() {
return warehouseplace;
}
public void setWarehouseplace(String warehouseplace) {
this.warehouseplace = warehouseplace;
}
public int getItemnumber() {
return itemnumber;
}
public void setItemnumber(int itemnumber) {
this.itemnumber = itemnumber;
}
public int getOutnumber() {
return outnumber;
}
public void setOutnumber(int outnumber) {
this.outnumber = outnumber;
}
}
class WarehouseManagement {
private WarehouseInformation[] warehouseItems;
public WarehouseManagement() {
warehouseItems = new WarehouseInformation[5];
}
public void start() {
boolean exit = false;
while (!exit) {
System.out.println("***********************************************************石家庄铁道大学前进22软件开发有限公司");
System.out.println("仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println("1、商品入库管理");
System.out.println("2、商品信息修改");
System.out.println("3、商品出库管理");
System.out.println("4、仓库盘点管理");
System.out.println("***********************************************************");
System.out.print("请输入数字选择功能:");
Scanner sc=new Scanner(System.in);
int choice=sc.Int(next);
switch (choice) {
case 1:
System.out.println("商品入库管理功能");
addItemInput();
break;
case 2:
System.out.println("商品信息修改功能");
break;
case 3:
System.out.println("商品出库管理功能");
break;
case 4:
System.out.println("仓库盘点管理功能");
break;
default:
System.out.println("该选项不存在,请重新输入!");
break;
}
System.out.print("是否返回主界面?(Y/N)");
String input = System.console().readLine();
if (input.equalsIgnoreCase("N")) {
exit = true;
}
}
}
public void addItemInput(Scanner scanner){
System.out.println("***********************************************************");
System.out.println("石家庄铁道大学前进22软件开发有限公司");
System.out.println("仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println("商品编号:");
String itemno = scanner.next();
System.out.println("商品名称:");
String itemname = scanner.next();
System.out.println("供货商信息:");
String suppliername = scanner.next();
System.out.println("入库时间:");
String warehousingtime = scanner.next();
System.out.println("存放仓库号:");
String warehousenumber = scanner.next();
System.out.println("存放位置信息:");
String warehouseplace = scanner.next();
System.out.println("入库商品数量:");
int itemnumber=scanner.nextInt();
WarehouseInformation item=new WarehouseInformation();
item.assignInitialValues(itemno,itemname,suppliername,warehousingtime,warehousenumber,warehouseplace,itemnumber);
System.out.println("***********************************************************");
System.out.println("石家庄铁道大学前进22软件开发有限公司");
System.out.println("仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println("商品编号:" + item.getItemno());
System.out.println("商品名称:" + item.getItemname());
System.out.println("供货商信息:" + item.getSuppliername());
System.out.println("入库时间:" + item.getWarehousingtime());
System.out.println("存放仓库号:" + item.getWarehousenumber());
System.out.println("存放位置信息:" + item.getWarehouseplace());
System.out.println("入库商品数量:" + item.getItemnumber());
System.out.println("该商品入库操作已完成,是否提交");
String submit=scanner.next();
if(submit.equals("Y")){
addItem(item);
}
}
}