第一部分,设计界面以及类的定义.

import java.util.Scanner;

public class viovo {
static int number = 5;//五个商品信息
static oppo[] s = new oppo[50]; public static void main(String[] args) { Scanner ab = new Scanner(System.in);
for(int i=0;i<s.length;i++)
{
s[i]=new oppo();//初始化
}
while (true) {
menu();
int choose = ab.nextInt();
switch (choose) {
case 1:
input();
break;
case 2:
change();
break;
case 3:
output();
break;
case 4:
pan();
break;
}
} } public static void menu() {/*主菜单*/
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("***********************************************************");
} public static void input() {/*商品入库*/
String YN;
int i=0;
int flag = 0;
Scanner sc = new Scanner(System.in);
String itemno0=""; //商品编号8
String itemname0=""; //商品名称
String suppliername0=""; //供货商名称
String warehousingtime0=""; //入库时间8
String warehousenumber0=""; //仓库编号3
String warehouseplace0=""; //商品具体位置XXXXYYZZ
int itemnumber0=0; //入库商品的数量。 while (true) {
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************"); Scanner sb=new Scanner(System.in);
int fllag=1;
while(fllag==1){
System.out.println("请输入商品编号");
itemno0=sb.nextLine();
if(itemno0.length()!=8) System.out.println("格式错误,请输入八位有效数字");
else fllag=0;
} System.out.println("请输入商品名称");
itemname0=sb.nextLine(); System.out.println("请输入供货商名称");
suppliername0=sb.nextLine(); int flag1=1;
while(flag1==1){
System.out.println("请输入入库时间");
warehousingtime0=sb.nextLine();
if(warehousingtime0.length()!=8) System.out.println("格式错误,请输入八位有效数字");
else flag1=0;
} int flag2=1;
while(flag2==1){
System.out.println("请输入仓库号");
warehousenumber0=sb.nextLine();
if(warehousenumber0.length()!=3) System.out.println("格式错误,请输入3位有效数字");
else flag2=0;
} int flag3=1;
while(flag3==1){
System.out.println("请输入商品具体位置");
warehouseplace0=sb.nextLine();
if(warehouseplace0.length()!=8) System.out.println("格式错误,请输入8位有效数字");
else flag3=0;
}
System.out.println("请输入入库商品的数量");
Scanner ab=new Scanner(System.in);
itemnumber0=ab.nextInt(); System.out.println("**********************************************************"); if (flag == 1) {
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 商品编号:" + itemno0);
System.out.println(" 商品名称:" + itemname0);
System.out.println(" 供货商信息:" + suppliername0);
System.out.println(" 入库时间:" + warehousingtime0);
System.out.println(" 存放仓库号:" + warehousenumber0);
System.out.println(" 存放位置信息:" + warehouseplace0);
System.out.println(" 入库商品数量:" + itemnumber0);
System.out.println("该商品入库操作已完成,是否提交(Y/N)");
YN = sc.next();
if (YN.equals("Y")) {
s[i].setItemno(itemno0);
s[i].setItemname(itemname0);
s[i].setSuppliername(suppliername0);
s[i].setWarehousingtime(warehousingtime0);
s[i].setWarehousenumber(warehousenumber0);
s[i].setWarehouseplace(warehouseplace0);
s[i].setItemnumber(s[i].getItemnumber() + itemnumber0);
break;
} else {
continue;
}
} else {
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 商品编号:" + itemno0);
System.out.println(" 商品名称:" + itemname0);
System.out.println(" 供货商信息:" + suppliername0);
System.out.println(" 入库时间:" + warehousingtime0);
System.out.println(" 存放仓库号:" + warehousenumber0);
System.out.println(" 存放位置信息:" + warehouseplace0);
System.out.println(" 入库商品数量:" + itemnumber0);
System.out.println("该商品入库操作已完成,是否提交(Y/N)");
YN = sc.next();
if (YN.equals("Y")) {
s[i].setItemno(itemno0);
s[i].setItemname(itemname0);
s[i].setSuppliername(suppliername0);
s[i].setWarehousingtime(warehousingtime0);
s[i].setWarehousenumber(warehousenumber0);
s[i].setWarehouseplace(warehouseplace0);
s[i].setItemnumber(itemnumber0);
number++;
break;
} else {
continue;
}
}
}
} public static void change() {
Scanner sc = new Scanner(System.in);
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.print("请输入商品编号:");
String itemno1 = sc.next();
System.out.println("**********************************************************");
for (int j = 0; j < s.length; j++) {
if (itemno1.equals(s[j].getItemno())) {
show(j);
System.out.print("请选择需要修改的信息编号(1-7):");
int choose0 = sc.nextInt();
System.out.println("***********************************************************");
if (choose0 < 1 || choose0 > 7) {
System.out.println("不存在");
break;
} else if (choose0 == 1) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的商品编号:");
String itemno2 = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setItemno(itemno2);
else break;
} else if (choose0 == 2) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的商品名称:");
String itemname2 = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setItemname(itemname2);
else break;
} else if (choose0 == 3) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的供货商信息:");
String suppliername2 = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setSuppliername(suppliername2);
else break;
} else if (choose0 == 4) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的入库时间:");
String warehousingtime2 = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setWarehousingtime(warehousingtime2);
else break;
} else if (choose0 == 5) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的存放仓库号:");
String wps = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String pp = sc.next();
if (pp.equals("Y"))
s[j].setWarehousenumber(wps);
else break;
} else if (choose0 == 6) {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的存放位置信息:");
String warehouseplace2 = sc.next();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setWarehouseplace(warehouseplace2);
else break;
} else {
show(j);
System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
System.out.print("请输入修改后的入库商品数量:");
int itemnumber2 = sc.nextInt();
System.out.println("***********************************************************");
System.out.println("Y/N");
String YN1 = sc.next();
if (YN1.equals("Y"))
s[j].setItemnumber(itemnumber2);
else break;
}
} else {
//System.out.println("没有找到商品");
continue;
}
}
} public static void output() {
Scanner sc = new Scanner(System.in);
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.print("请输入商品编号:");
String itemno3 = sc.next();
System.out.println("**********************************************************");
for (int j = 0; j <s.length; j++) {
if (itemno3.equals(s[j].getItemno())) {
show(j);
System.out.print("出库时间:");
String chukutime=sc.next();
System.out.print("出库数量:");
int chukunumber=sc.nextInt();
System.out.println("Y/N");
String YN4= sc.next();
if(YN4.equals("Y")){
s[j].setShipmenttime(chukutime);
s[j].setOutnumber(chukunumber);
break;
}
else continue;
}
else {
System.out.println("库中没有该商品");
continue;
}
}
}
public static void pan(){
Scanner ab=new Scanner(System.in);
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
for(int i=0;i<number;i++){
System.out.println((i+1)+"商品编号:"+s[i].getItemno()+"商品名称:"+s[i].getItemname()+"库存数量:"+(s[i].getItemnumber()-s[i].getOutnumber()));
}
} public static void show(int j){
System.out.println("**********************************************************");
System.out.println(" 石家庄铁道大学前进22软件开发有限公司");
System.out.println(" 仓库管理系统2022版");
System.out.println("***********************************************************");
System.out.println(" 1、商品编号:" + s[j].getItemno());
System.out.println(" 2、商品名称:" + s[j].getItemname());
System.out.println(" 3、供货商信息:" + s[j].getSuppliername());
System.out.println(" 4、入库时间:" + s[j].getWarehousingtime());
System.out.println(" 5、存放仓库号:" + s[j].getWarehousenumber());
System.out.println(" 6、存放位置信息:" + s[j].getWarehouseplace());
System.out.println(" 7、入库商品数量:" + s[j].getItemnumber()); } }
public class oppo {
private String itemno; //商品编号8
private String itemname; //商品名称
private String suppliername; //供货商名称
private String warehousingtime; //入库时间8
private String shipmenttime; //出库时间8
private String warehousenumber; //仓库编号3
private String warehouseplace; //商品具体位置XXXXYYZZ
private int itemnumber; //入库商品的数量。
private int outnumber; //表示出库商品的数量
public oppo(){
}
public oppo(String itemno,String itemname,String suppliername,String warehousingtime,String shipmenttime,String warehousenumber,String warehouseplace,int itemnumber,int outnumber)
{this.itemno=itemno;
this.outnumber=outnumber;
this.itemname=itemname;
this.itemno=itemno;
this.warehousenumber=warehousenumber;
this.warehouseplace=warehouseplace;
this.warehousingtime=warehousingtime;
this.suppliername=suppliername;
this.shipmenttime=shipmenttime;
this.itemnumber=itemnumber;
} 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;
}
}

第二部分设计出库与入库功能

9.4classtest rewrite(仓库管理系统)的更多相关文章

  1. PDA无线数据采集器在仓库管理系统中的应用

    条码数据采集器在仓库管理系统中的应用,条码数据采集器,顾名思义就是通过扫描货物条码,对货物进行数量分类采集,方便仓库正规化管理.条码数据采集器是现代化条码仓库管理系统中不可缺少的一部分,能提升企业的整 ...

  2. 吉特仓库管理系统- 斑马打印机 ZPL语言的腐朽和神奇

    上一篇文章说到了.NET中的打印机,在PrintDocument类也暴露一些本质上上的问题,前面也提到过了,虽然使用PrintDcoument打印很方便.对应条码打印机比如斑马等切刀指令,不依赖打印机 ...

  3. QT 仓库管理系统 开放源代码

    IT 要走多久,要怎么走. IT 要走多久,要怎么走.这些问题,在我已经快毕业了一个年头的如今,又又一次浮如今我的脑海里.一边是工作的了了模块,一边是能够自己无聊打发的时间.这不是我当初要的路,如今的 ...

  4. SSH综合练习-仓库管理系统-第二天

    SSH综合练习-仓库管理系统-第二天 今天的主要内容: 货物入库 页面信息自动补全回显功能:(学习目标:练习Ajax交互) 根据货物简记码来自动查询回显已有货物(Ajax回显) 根据货物名来自动查询补 ...

  5. JAVA仓库管理系统(附源码+调试)

    JAVA仓库管理系统--三只松鼠仓库管理系统功能描述(1)登录模块:登录信息等存储在数据库中(2)基本档案管理模块:供货商管理,销售商管理,货品档案管理,仓库管理(3)采购订货模块:用户可以通过查询条 ...

  6. 吉特仓库管理系统(开源)-如何在网页端启动WinForm 程序

    在逛淘宝或者使用QQ相关的产品的时候,比如淘宝我要联系店家点击旺旺图标的时候能够自动启动阿里旺旺进行聊天.之前很奇怪为什么网页端能够自动启动客户端程序,最近在开发吉特仓储管理系统的时候也遇到一个类似的 ...

  7. ERP仓库管理系统查询(十)

    需求:    1.根据仓库编号,获取仓库信息绑定至页面相关控件. 2.根据仓库编号,获取管理员信息绑定到页面相关控件 修改的界面: <%@ Page Language="C#" ...

  8. ERP仓库管理系统(九)

    需求分析: 1.设计库房表,至少包括两个字段,库房名称,库房所属公司的ID(在客户资质审批表中找到对应公司的ID) 2.设计增.删.改.查一套程序,其中的删除要做限制,只要有库存数据存在则不允许删除对 ...

  9. 私有仓库 gitlab 部署笔记

    --------------------------------------------gitlab简介------------------------------------------------ ...

  10. Git系列②之部署企业级开源仓库gitlab服务器

    Git系列②之部署企业级开源仓库gitlab服务器 上一篇我们介绍了github的常见使用方法,下面开始部署本地开源仓库gitlab GitLab 是一个用于仓库管理系统的开源项目. 1.安装配置gi ...

随机推荐

  1. 《使用Gin框架构建分布式应用》阅读笔记:p1-p19

    <使用Gin框架构建分布式应用>学习第1天,p1-p19总结,总计19页. 一.技术总结 1.go get & go install 执行go get 或者 go install ...

  2. 使用 OpenFunction 在任何基础设施上运行 Serverless 工作负载

    作者: 霍秉杰:KubeSphere 可观测性.边缘计算和 Serverless 团队负责人,Fluent Operator 和 OpenFunction 项目的创始人,还是多个可观测性开源项目包括 ...

  3. KubeSphere 社区双周报 | 开源之夏已启动 | 2023.04.28-05.11

    KubeSphere 社区双周报主要整理展示新增的贡献者名单和证书.新增的讲师证书以及两周内提交过 commit 的贡献者,并对近期重要的 PR 进行解析,同时还包含了线上/线下活动和布道推广等一系列 ...

  4. 使用 Cursor 和 Devbox 快速开发并上线 Gin 项目

    作为开发者,最让我们头疼的事情是什么?那必须是环境配置.版本控制以及各种部署配置等等繁琐的工作. 想象一下,如果你只需点击几下鼠标,就能拥有一个完全配置好的开发环境,支持从 Java 到 Python ...

  5. snap和apt的区别简单了解[]

    Linux中没有tree命令的时候提示安装的时候出现了两个命令,简单看了看两者有何区别(一般用apt就可以了):   sudo snap install tree 和 sudo apt install ...

  6. C语言常见概念

    目录 1.C语言是什么? 2.编译器的选择Clion 3.第一个C语言程序 4.main函数 5.printf和库函数 6.关键字介绍 7.字符和ASCII编码 8.转义字符 9.语句和语句分类 9. ...

  7. SDUT 2021 Autumn Team Contest 36th G - Alice’s Stamps(补)

    队友做出的这个题,赛后补的=.= G - Alice's Stamps (一般DP) 题目大意 :给你m个区间,选k个,求k个区间并集 1≤T≤100 1≤K≤M 1≤N,M≤2000 1≤Li≤ R ...

  8. .NET 8 高性能跨平台图像处理库 ImageSharp

    前言 传统的 System.Drawing 库功能丰富,但存在平台限制,不适用于跨平台开发..NET 8 的发布,ImageSharp 成为了一个更好的选择. ImageSharp 是一个完全开源.高 ...

  9. Cursor使用

    Cursor是一款AI 代码编辑器,官网地址为https://www.cursor.com/,直接在官网下载安装即可,基于VS Code二次开发而来,之所以没有采用插件方式,在官方网站上给出的答案是某 ...

  10. DDCA —— 缓存一致性

    1. 多处理器内存组织结构 1.1 SMP/集中式共享内存 集中式共享内存多处理器(Centralized shared-memory multiprocessor)或对称共享内存多处理器(Symme ...