仓库管理系统

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Iterator;3

class WarehouseInformation
{
String itemno;
String itemname;
String suppliername;
String warehousingtime;
String shipmenttime;
String warehousnumber;
String warehousplace;
int itemnumber;
int outnumber;

WarehouseInformation(String itemno,String itemname,String suppliername,String warehousingtime,String shipmenttime,String warehousnumber,
String warehousplace,int itemnumber,int outnumber)
{
this.itemno=itemno;
this.itemname=itemname;
this.suppliername=suppliername;
this.warehousingtime=warehousingtime;
this.shipmenttime=shipmenttime;
this.warehousnumber=warehousnumber;
this.warehousplace=warehousplace;
this.itemnumber=itemnumber;
this.outnumber=outnumber;
}

public WarehouseInformation(String itemno,String itemname,String suppliername,String warehousingtime,String warehousnumber,String warehousplace,int itemnumber) {
}

public WarehouseInformation(String itemno, String itemname, String suppliername, String warehousingtime, String warehousingnumber, String warehousplace) {
}

public String getItemno()
{
return itemno;
}
public String getItemname()
{
return itemname;
}
public String getSuppliername()
{
return suppliername;
}
public String getWarehousingtime()
{
return warehousingtime;
}
public String getWarehousnumber()
{
return warehousnumber;
}
public String getWarehousplace()
{
return warehousplace;
}
public String getShipmenttime()
{
return shipmenttime;
}
public int getItemnumber()
{
return itemnumber;
}
public int getOutnumber()
{
return outnumber;
}
}

public class Main{
public static void main(String[] args) {
ArrayList<WarehouseInformation> list = new ArrayList<WarehouseInformation>();
list.add(new WarehouseInformation("1", "商品1", "供货商1", "20230904", "1", "11111111", 1));
list.add(new WarehouseInformation("2", "商品2", "供货商2", "20230904", "1", "22222222", 1));
list.add(new WarehouseInformation("3", "商品3", "供货商3", "20230904", "1", "33333333", 1));
list.add(new WarehouseInformation("4", "商品4", "供货商4", "20230904", "1", "44444444", 1));
list.add(new WarehouseInformation("5", "商品5", "供货商5", "20230904", "1", "55555555", 1));
String st = "yes";
while (st.equals("yes")) {
System.out.println("***********************************************************");
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("**********************************************************");
Scanner sc = new Scanner(System.in);
int s = sc.nextInt();
if (s == 1) {

System.out.println("开始录入商品信息!");
Scanner sc1 = new Scanner(System.in);
System.out.println("请输入商品的编号:");
String itemno = sc1.next();
System.out.println("请输入商品的名称:");
String itemname = sc1.next();
System.out.println("请输入商品的供货商:");
String suppliername = sc1.next();
System.out.println("请输入商品的入库时间:");
String warehousingtime = sc1.next();
System.out.println("请输入商品的仓库编号:");
String warehousingnumber = sc1.next();
System.out.println("请输入存放仓库的具体位置:");
String warehousplace = sc1.next();
System.out.println("请输入入库商品数量:");
list.add(new WarehouseInformation(itemno, itemname, suppliername, warehousingtime, warehousingnumber, warehousplace));
int itemnumber = sc1.nextInt();
int nextInt = sc1.nextInt();
Iterator it = list.iterator();
WarehouseInformation warehouseInformation = (WarehouseInformation) it.next();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 商品编号:"+warehouseInformation.itemno);
System.out.println(" 商品名称:"+warehouseInformation.itemname);
System.out.println(" 供货商信息:"+warehouseInformation.suppliername);
System.out.println(" 入库时间:"+warehouseInformation.warehousingtime);
System.out.println(" 存放仓库号:"+warehouseInformation.warehousnumber);
System.out.println(" 存放仓库位置:"+warehouseInformation.warehousplace);
System.out.println(" 入库商品数量:"+warehouseInformation.itemnumber);
}
else if (s == 2) {
Scanner sc2 = new Scanner(System.in);
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 请输入商品编号:XXXXXXXX");
System.out.println("***********************************************************");
String itemno = sc2.next();
} else if (s == 3) {
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 请输入商品编号:XXXXXXXX");
System.out.println("***********************************************************");
} else if (s == 4) {
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
}
Scanner sc5 = new Scanner(System.in);
}
}
}

posted @ 2023-09-18 09:46  大虚胖子  阅读(18)  评论(0编辑  收藏  举报