Call System queuing system registration system implementation, call queuing registration implementation

Source: Internet
Author: User

Call System queuing system registration system implementation, call queuing registration implementation

The queue is used in many places. There are many examples in reality. For example, the hospital registration system, the telephone system in the bank, and the queuing system in the canteen. This is another queuing device on the market. Their functions are basically as follows:

1. The system can connect to the Internet to send a uniform number;
2. The system can be connected wirelessly or wired;
3. The system supports more than 100 businesses;
4. The system supports prompt waiting information for multiple waiting areas. The voice and display of each waiting area can be independent;
5. Personalized voice can call the customer's business name (hospital edition can call patient name) and other information;
6. numbers can be transferred between counter windows in different service categories, so customers do not have to wait in line repeatedly;
7. logon and exit functions: Enter the employee logon number before the start of the job to log on. After the job is finished, exit the queuing system. This is very accurate for statistics;
8. The image on the account sending interface can be replaced by personalized design;
9. Key-pressing customers of various businesses can completely design and replace based on their own personalization;
10. After reading customer-related information through a card reader, the system automatically distinguishes VIP and general customers, automatically distinguishes public and private customers, and queues are automatically organized according to the custom queuing rules of the business organization;
11. The number of waiting persons in front of each customer is displayed on the ticket and the display on the sender's machine;
12. Various business queue customers can increase or decrease as needed;
13. The number of users waiting for various businesses can be automatically set on the interface and displayed in any layout;
14. Customers can set their own business periods and suspension periods;
15. Customers who increase or decrease employees and log on to the account can change the account on their own;
16. Voice call information customers can customize their own changes;
17. Customers can customize any display information on the display screen;
18. The customer can set the serial numbers for each business, such: VIP business or financial management business can be set to business 1-, foreign currency business can be set to business 1-, and RMB business is set to business 1;
19. Business queue customers handled by employees can set their own priorities;
20. Customers with the text content, pattern, business name, time format, font and size change, and paper length on the ticket No. can customize the settings on their own;
21. The system supports playing background music, which is completely chosen by the customer;
22. The system supports the addition of monitoring software in the duty manager to handle various special situations;
23. The system supports high-definition plasma display, large screen, TV wall, and other display devices to display rich queue information;
24. The system supports connection to the interconnected network for remote monitoring;
25. The system has extended functions. When statistics and management data are required, you can use hotkeys to activate and print the management software;
26. The system can configure the customer evaluator and queuing information (SMS) reminder function as needed.

OK. After learning about this, let's implement a simple example! Let's take a look:


Let's talk about the Code:

CallNum. java

Package com. test; import java. util. concurrent. executorService; import java. util. concurrent. executors; import java. util. concurrent. timeUnit;/*** @ see simulate bank call system * @ author Herman. xiong * @ date November 17, 2014 14:48:48 * @ version V1.0 */public class CallNum {public static void main (String [] args) throws InterruptedException {// create a service center, for example, a bank's business Center center = new Center (); ExecutorService exec = Executors. new CachedThreadPool (); // simulate the production of service personnel Producer = new producer (center); // simulate the generation of N multi-customer Consumer consumer = new Consumer (center ); exec.exe cute (producer); // simulate 10 customers for (int I = 0; I <10; I ++) {exec.exe cute (consumer);} TimeUnit. SECONDS. sleep (10); exec. shutdown (); // if you have any questions, add the QQ group: 135430763 to learn together! }}
Center. java

Package com. test; import java. util. random; import java. util. concurrent. blockingQueue; import java. util. concurrent. linkedBlockingQueue; import java. util. concurrent. timeUnit;/*** @ see service center * @ author Herman. xiong * @ date 14:41:28 * @ version V1.0 */public class Center extends Thread {private final static int MAXCOUNT = 10; private BlockingQueue <Waiter> waiters; private BlockingQueue <Customer> MERs MERS; private Random rand = new Random (47); private final static int PRODUCERSLEEPSEED = 100; private final static int CONSUMERSLEEPSEED = 10000; public Center () {// create 10 service providers this. waiters = new LinkedBlockingQueue <Waiter> (MAXCOUNT); for (int I = 0; I <MAXCOUNT; I ++) {waiters. add (new Waiter ();} // 10 staff are ready to work, create a customer queue this. customers = new LinkedBlockingQueue <Customer> ();} public void produce () {try {TimeUnit. MILLISECONDS. sleep (rand. nextInt (PRODUCERSLEEPSEED);} catch (InterruptedException e) {e. printStackTrace ();} this. MERs. add (new Customer ();} public void consume () {try {// service window available Waiter waiter = this. waiters. take (); this. waiters. remove (waiter); // Customer customer Customer = this. MERs. take (); this. MERs. remove (customer); // The window displays System. out. println (waiter + "Serving" + customer +... "); TimeUnit. MILLISECONDS. sleep (rand. nextInt (CONSUMERSLEEPSEED); this. waiters. add (waiter);} catch (InterruptedException e) {System. err. println ("---" + e. getMessage ());}}}
Producer. java

Package com. test;/*** @ see producer thread, simulate a bank staff service to complete a customer and then start preparing to serve the next customer * @ author Herman. xiong * @ date November 17, 2014 14:55:43 * @ version V1.0 */public class Producer implements Runnable {private Center center; public Producer (Center center) {this. center = center ;}@ Override public void run () {while (! Thread. interrupted () {// generate Customer center. produce ();}}}
Consumer. java

Package com. test;/*** @ see, after simulating the customer's business needs, the service staff is ready for use * @ author Herman. xiong * @ date November 17, 2014 14:57:11 * @ version V1.0 */public class Consumer implements Runnable {private Center center Center; public Consumer (center Center) {this. center = center ;}@ Override public void run () {while (! Thread. interrupted () {center. consume ();}}}
Click source code download: http://download.csdn.net/download/xmt1139057136/8167619

For more information, see my blog! If you have any questions, please join the QQ group: 135430763 to learn together!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.