⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 process.java

📁 java版虚拟社区,在mysql上运行.
💻 JAVA
字号:
package serverpack;

import java.sql.*;
import java.lang.*;
import java.util.*;
import java.io.*;
import java.net.*;

public class Process 
{
	private MySQL database;
	
	private Connection conn;
	
	public Monitor mo;
	
	private StartProcess startpro;
	private CustomerProcess customerpro;
	private BankProcess bankpro;
	private InvestProcess investpro;
	private SoftSellProcess softsellpro;
	private SoftDevelopProcess softdeveloppro;
	private RestaurantProcess restaurantpro;
	
	public Process(Monitor smo)
	{
		database = new MySQL();
		mo = smo;
		try
		{
			database.connect();
			if(database.conn != null) 
			{
	            System.out.println("Database connect succcess");
	            conn = database.conn;
			}
			else 
			{
	            System.out.println("Database connect failed!");
			}
			
		}
		catch(SQLException e) 
	    { 
	    	System.out.println("SQLException"); 
	        e.printStackTrace(); 
	    } 
		startpro = new StartProcess(conn,mo);
		customerpro = new CustomerProcess(conn,mo);
		bankpro = new BankProcess(conn,mo);
		investpro = new InvestProcess(conn,mo);
		softsellpro = new SoftSellProcess(conn,mo);
		softdeveloppro = new SoftDevelopProcess(conn,mo);
		restaurantpro = new RestaurantProcess(conn,mo);
	}
	
	public boolean MessagePro(MyMessage mm)
	{
		System.out.println("Message processing...");

		if("RestaurantFinanceView".equals(mm.GetType()))
		{
			return restaurantpro.RestaurantFinanceView(mm);
		}
		if("RestaurantCustomerView".equals(mm.GetType()))
		{
			return restaurantpro.RestaurantCustomerView(mm);
		}
		if("RestaurantMenuView".equals(mm.GetType()))
		{
			return restaurantpro.RestaurantMenuView(mm);
		}
		if("RestaurantAddToMenu".equals(mm.GetType()))
		{
			return restaurantpro.RestaurantAddToMenu(mm);
		}
		if("SoftSellBalance".equals(mm.GetType()))
		{
			return softsellpro.SoftSellBalance(mm);
		}
		if("SoftSellFinanceView".equals(mm.GetType()))
		{
			return softsellpro.SoftSellFinanceView(mm);
		}
		if("SoftSellCustomerView".equals(mm.GetType()))
		{
			return softsellpro.SoftSellCustomerView(mm);
		}
		if("SoftSellFeedbackView".equals(mm.GetType()))
		{
			return softsellpro.SoftSellFeedbackView(mm);
		}
		if("SoftSellAllView".equals(mm.GetType()))
		{
			return softsellpro.SoftSellAllView(mm);
		}
		if("SoftDevelopFinanceView".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopFinanceView(mm);
		}
		
		if("SoftDevelopFeedbackView".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopFeedbackView(mm);
		}
		if("SoftDevelopBid".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopBid(mm);
		}
		if("SoftDevelopOrder".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopOrder(mm);
		}
		if("SoftDevelopChooseSell".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopChooseSell(mm);
		}
		if("SoftDevelopCarryOn".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopCarryOn(mm);
		}
		if("SoftDevelopNew".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopNew(mm);
		}
		if("SoftDevelopedView".equals(mm.GetType()))
		{
			return softdeveloppro.SoftDevelopedView(mm);
		}
		if("BidView".equals(mm.GetType()))
		{
			return investpro.BidView(mm);
		}
		if("BiderView".equals(mm.GetType()))
		{
			return investpro.BiderView(mm);
		}
		if("InvestCorpInvest".equals(mm.GetType()))
		{
			return investpro.InvestCorpInvest(mm);
		}
		if("InvestCorpBidInvest".equals(mm.GetType()))
		{
			return investpro.InvestCorpBidInvest(mm);
		}
		if("InvestCorpSoftDevelopView".equals(mm.GetType()))
		{
			return investpro.InvestCorpSoftDevelopView(mm);
		}
		if("InvestCorpProjectView".equals(mm.GetType()))
		{
			return investpro.InvestCorpProjectView(mm);
		}
		if("InvestCorpMyInvestView".equals(mm.GetType()))
		{
			return investpro.InvestCorpMyInvestView(mm);
		}
		if("Release".equals(mm.GetType()))
		{
			return investpro.Release(mm);
		}
		if("BankFinanceView".equals(mm.GetType()))
		{
			return bankpro.BankFinanceView(mm);
		}
		if("BankGrant".equals(mm.GetType()))
		{
			return bankpro.BankGrant(mm);
		}
		if("BankLoanView".equals(mm.GetType()))
		{
			return bankpro.BankLoanView(mm);
		}		
		if("BankNotPaybackView".equals(mm.GetType()))
		{
			return bankpro.BankNotPaybackView(mm);
		}
		if("BankClientDetailView".equals(mm.GetType()))
		{
			return bankpro.BankClientDetailView(mm);
		}
		if("BankAllView".equals(mm.GetType()))
		{
			return bankpro.BankAllView(mm);
		}
		if("Feedback".equals(mm.GetType()))
		{
			return customerpro.Feedback(mm);
		}
		if("Payback".equals(mm.GetType()))
		{
			return customerpro.Payback(mm);
		}
		if("CheckSoft".equals(mm.GetType()))
		{
			return customerpro.CheckSoft(mm);
		}
		if("CheckLoan".equals(mm.GetType()))
		{
			return customerpro.CheckLoan(mm);
		}
		if("Record".equals(mm.GetType()))
		{
			return customerpro.Record(mm);
		}
		///////////////////////////////////////////////////////
		if("Dine".equals(mm.GetType()))
		{
			return customerpro.Dine(mm);
		}
		if("FoodView".equals(mm.GetType()))
		{
			return customerpro.FoodView(mm);
		}
		if("AllRestaurantView".equals(mm.GetType()))
		{
			return customerpro.AllRestaurantView(mm);
		}
		if("BuySoft".equals(mm.GetType()))
		{
			return customerpro.BuySoft(mm);
		}
		if("SoftView".equals(mm.GetType()))
		{
			return customerpro.SoftView(mm);
		}
		if("AllSoftSellView".equals(mm.GetType()))
		{
			return customerpro.AllSoftSellView(mm);
		}
		/////////////////////////////////////////////////////
		if("CorpLoan".equals(mm.GetType()))
		{
			return bankpro.CorpLoan(mm);
		}
		if("CorpRecord".equals(mm.GetType()))
		{
			return bankpro.CorpRecord(mm);
		}
		if("Loan".equals(mm.GetType()))
		{
			return bankpro.Loan(mm);
		}
		if("Transfer".equals(mm.GetType()))
		{
			return bankpro.Transfer(mm);
		}
		if("Deposit".equals(mm.GetType()))
		{
			return bankpro.Deposit(mm);
		}
		if("Withdraw".equals(mm.GetType()))
		{
			return bankpro.Withdraw(mm);
		}
		if("CheckAccount".equals(mm.GetType()))
		{
			return bankpro.CheckAccount(mm);
		}
		if("LoginBank".equals(mm.GetType()))
		{
			return bankpro.Loginbank(mm);
		}
		if("IfNewAccount".equals(mm.GetType()))
		{
			return bankpro.IfNewAccount(mm);
		}
		if("NewAccount".equals(mm.GetType()))
		{
			return bankpro.NewAccount(mm);
		}
		if("RegCustomer".equals(mm.GetType()))
		{
			return startpro.RegCustomer(mm);			
		}
		if("RegSoftDevelp".equals(mm.GetType()))
		{
			return startpro.RegSoftDevelp(mm);
		}
		if("RegSoftSell".equals(mm.GetType()))
		{
			return startpro.RegSoftSell(mm);
		}
		if("RegInvestCorp".equals(mm.GetType()))
		{
			return startpro.RegInvestCorp(mm);
		}
		if("RegRestaurant".equals(mm.GetType()))
		{
			return startpro.RegRestaurant(mm);
		}
		if("Login".equals(mm.GetType()))
		{
			return startpro.Login(mm);
		}
		if("Left".equals(mm.GetType()))
		{
			return startpro.Left(mm);
		}
		if("Init".equals(mm.GetType()))
		{
			return startpro.Init(mm);
		}
		return false;
	}
	

};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -