WeChat mini-program-based mini-program for appointment of COVID-19 services

Contact at the end of the article to obtain the source code

Development language: Java

Framework: ssm

JDK version: JDK1.8

Server: tomcat7

Database: mysql 5.7/8.0

Database tool: Navicat11

Development software: eclipse/myeclipse/idea

Maven package: Maven3.3.9

Browser: Google Chrome

Small program framework: uniapp

Small program development software: HBuilder X

Small program running software: WeChat developer

1. Introduction

The social development is changing with each passing day, and the use of computer applications to realize the data management function is considered to be very complete. However, with the advent of the mobile Internet, the processing of information is no longer subject to geographical restrictions, and the processing of information is timely and efficient, which is loved by people. Therefore, major Internet manufacturers are aiming at the trend of mobile Internet to carry out major layouts. After years of great waves, various mobile operating systems have been launched, and the current market share is the highest. WeChat applet.

The development of a new crown pneumonia service reservation WeChat applet has three roles: administrator, hospital, and user. Both the administrator and the hospital can log in on the background webpage. The administrator functions include personal center, hospital management, user management, epidemic prevention measure management, vaccine information management, nucleic acid detection management, vaccine appointment management, nucleic acid appointment management, vaccination information management, and test results Administration, system administration. Hospitals can register and log in, manage vaccine information and nucleic acid testing information, review vaccine appointment information and nucleic acid appointment information, and view vaccination information and test results. Users can register and log in on the WeChat applet, make appointments for vaccine and nucleic acid inspections, and view vaccination information and test results. The new crown pneumonia service reservation WeChat applet server uses the website background developed in Java to receive and process the json data imported from the WeChat applet. The database uses the MySQL database as data storage. In this way, users can use it conveniently and quickly, and all business processes are performed through the same background, and the background can be deployed according to the amount of concurrency, and hardware and software can be used to cooperate, satisfying the interactive processing of data, and allowing users to store data more efficiently. Safe, more convenient to get data. 

2. System function structure

On the basis of the determined function modules of the administrator, each function of the administrator is designed, and the detailed modules of the administrator function are determined. The drawn administrator function structure is shown in the figure below.

3. Realization of WeChat mini-program functions

3.1 Homepage 

After the WeChat applet enters the correct account password, it will enter the homepage display interface by default. The homepage mainly has a carousel image, a search box, and the navigation below as the main components. 

3.2 Vaccine information 

The user can click on the vaccine information to see the vaccine information interface. There is a search bar, and users can click on a certain vaccine information to view it. 

3.3 Vaccine appointment

Users can make vaccine reservations for vaccines. 

3.4 mine

The main thing in my account is that you can log out. Click the small gear to choose to log out of your current account. You can make appointments for vaccine and nucleic acid inspections, and you can view vaccination information and test results. 

Fourth, the administrator background function realization

4.1 User Management

Administrators can add, modify, delete, and query user information. 

4.2 Hospital Management 

Administrators can add, modify, delete, and query hospital information. 

4.3 Management of epidemic prevention measures 

Administrators can add, modify, delete, and query information on epidemic prevention descriptions. 

4.4 Vaccine Information Management 

Hospitals can add, modify, delete and query vaccine information. 

5. Part of the core code

5.1 Main code of login system

/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		
		String token = tokenService.generateToken(user.getId(), username,"yonghu",  "用户" );
		return R.ok().put("token", token);
	}

5.2 Upload file key code

@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		/**
  		 * 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
   		 * 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
 		 * 并且项目路径不能存在中文、空格等特殊字符
 		 */
//		FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}

Guess you like

Origin blog.csdn.net/qq_61827376/article/details/129094208