import java.util.Scanner;
public class WarehouseManagement {
public static void main(String[] args) {
WarehouseInformation ware []=new WarehouseInformation[5];
ware[0]=new WarehouseInformation("20203982","华为笔记本电脑","河北省光明正大有限公司","20230904","","003","0180350",100,0);
ware[1]=new WarehouseInformation("20203983","华为笔记本电脑","河北省光明正大有限公司","20230905","","004","0180351",200,0);
ware[2]=new WarehouseInformation("20203984","华为笔记本电脑","河北省光明正大有限公司","20230906","","005","0180352",300,0);
ware[3]=new WarehouseInformation("20203985","华为笔记本电脑","河北省光明正大有限公司","20230907","","006","0180353",400,0);
ware[4]=new WarehouseInformation("20203986","华为笔记本电脑","河北省光明正大有限公司","20230908","","007","0180354",500,0);
while(true){
menu.show();
int a=0;
Scanner num = new Scanner(System.in);
a = num.nextInt();
if(a==1){
menu.inmanagement(ware);
}
else if(a==2){
menu.xiugai(ware);
}
else if(a==3){
menu.chuku(ware);
}
else if(a==4){
menu.pandian(ware);
break;
}
else{
System.out.println("输入不正确,请重新输入");
}
}
}
}
public class WarehouseInformation {
private String itemno,itemname,suppliername,warehousingtime,shipmenttime,warehousenumber,warehouseplace;
private int itemnumber,outnumber;
WarehouseInformation(String itemno,String itemname,String suppliername,String warehousingtime,String shipmenttime,String warehousenumber,String warehouseplace,int itemnumber,int outnumber)
{
this.itemno=itemno;
this.itemname=itemname;
this.suppliername=suppliername;
this.warehousingtime=warehousingtime;
this.shipmenttime=shipmenttime;
this.warehousenumber=warehousenumber;
this.warehouseplace=warehouseplace;
this.itemnumber=itemnumber;
this.outnumber=outnumber;
}
public void setItemno(String s){itemno=s;}
public String getItemno(){return itemno;}
public void setItemname(String s){itemname=s;}
public String getItemname(){return itemname;}
public void setSuppliername(String s){suppliername=s;}
public String getSuppliername(){return suppliername;}
public void setWarehousingtime(String s){warehousingtime=s;}
public String getWarehousingtime(){return warehousingtime;}
public void setShipmenttime(String s){shipmenttime=s;}
public String getShipmenttime(){return shipmenttime;}
public void setWarehousenumber(String s){warehousenumber=s;}
public String getWarehousenumber(){return warehousenumber;}
public void setWarehouseplace(String s){warehouseplace=s;}
public String getWarehouseplace(){return warehouseplace;}
public void setItemnumber(int s){itemnumber=s;}
public int getItemnumber(){return itemnumber;}
public void setOutnumber(int s){outnumber=s;}
public int getOutnumber(){return outnumber;}
}
public class menu {标签:String,System,测试,println,ware,public,out From: https://www.cnblogs.com/yang-----/p/17710275.html
public static void show() {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n" +
"1、商品入库管理\n" +
"2、商品信息修改\n" +
"3、商品出库管理\n" +
"4、仓库盘点管理\n" +
"**********************************************************");
}
public static void inmanagement(WarehouseInformation ware[]) {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n" +
"请依次输入商品编码、商品名称、供货商信息、入库时间、存放仓库号、存放位置信息");
String num1;
Scanner num = new Scanner(System.in);
num1 = num.next();
int i;
for (i = 0; i < 5; i++) {
String args[]=new String[i];
if (ware[i].getItemno().equals(num1)) {
while (true) {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n");
System.out.println("商品编号:" + ware[i].getItemno());
System.out.println("商品名称:" + ware[i].getItemname());
System.out.println("供货商信息:" + ware[i].getSuppliername());
System.out.println("入库时间:" + ware[i].getWarehousingtime());
System.out.println("存放仓库号:" + ware[i].getWarehousenumber());
System.out.println("存放位置信息:" + ware[i].getWarehouseplace());
System.out.println("入库商品数量:" + ware[i].getItemnumber());
System.out.println("该商品入库操作已完成,是否提交(Y/N)\n" +
"**********************************************************");
break;
}
}
if (i == 5) {
System.out.println("请重新输入");
}
}
}
public static void xiugai(WarehouseInformation ware[]) {
System.out.println("***********************************************************\n"+
"石家庄铁道大学前进22软件开发有限公司\n+"+
"仓库管理系统2022版\n"+
"***********************************************************\n"+
"请输入商品编号:XXXXXXXX\n"+
"**********************************************************");
String num1;
Scanner num = new Scanner(System.in);
num1=num.next();
int u;
u=num.nextInt();
switch(u){
case 1:
}
}
public static void chuku(WarehouseInformation ware[]){
}
public static void pandian(WarehouseInformation ware[]){
System.out.println("***********************************************************\n"+
"石家庄铁道大学前进22软件开发有限公司\n"+
"仓库管理系统2022版\n"+
"***********************************************************\n");
int i;
for (i = 0; i < 5; i++){
System.out.println("商品编号:" + ware[i].getItemno());
System.out.println("商品名称:" + ware[i].getItemname());
System.out.println("库存数量:");
}
String num1;
Scanner num = new Scanner(System.in);
num1 = num.next();
}
}