ThinkPHP实现在线生成准考证

WBOY
Release: 2016-06-23 14:03:42
Original
1870 people have browsed it

如何根据库表中已有的用户报名信息,制作每个用户的准考证(尤其是准考证编号,考试地点),如何实现,主要是思想,求大神指点?


回复讨论(解决方案)

准考证号码不是在线生成的,而是预先生成并保存的
一般来自同一地点的考生应均匀发配到各个考点;考点中来自同一地点的考生不相邻

准考证号码不是在线生成的,而是预先生成并保存的
一般来自同一地点的考生应均匀发配到各个考点;考点中来自同一地点的考生不相邻

嗯嗯,说的有道理,可是具体怎么对应上呢

基本算法大致这样:
考点数已知,顺序编号,考生按来源地排序
遍历考生,分配考点。每分配一个,考点号加一(循环计数)
对于每个考点,重复上面的过程,分配位子

好的已经解决

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!