Every year, a large number of new students need to report,But in many cases, it is the first time to report to the school,I don't know the specific registration process and the school's arrangement,If you go to notify one by one, it will increase the workload of the staff invisibly,The best way at present is to develop a new registration system,Let the new students check the specific work flow and arrangement by themselves
The system is divided into two parts: management personnel and new users according to actual needs. The specific functions are as follows,
計算機畢業設計Python+djangThe new student registration service management system(源碼+系統+mysql數據庫+Lw文檔)
開發語言:Python
python框架:django
軟件版本:python3.7/python3.8
數據庫:mysql 5.7或更高版本
數據庫工具:Navicat11
開發軟件:PyCharm/vs code
前端框架:vue.js
可開發框架:ssm/Springboot/vue/python/PHP/小程序/安卓均可開發
This interface is the system login interface,In this interface, both administrators and users can log in here,At the same time, if the new user does not have an account,還可以進行注冊
The administrator can manage the users of the system after logging in.User information mainly includes the user's account,用戶的密碼,姓名.phone and avatar,Administrators can modify and delete users,At the same time, you can view the detailed information of the user.
In addition to managing users, administrators,You can also manage the freshmen every year. The freshman management mainly includes the account of the freshman,name of freshman,性別.學號,報道時間,Scores and information on where students come from.The administrator can modify and delete the new student information in this module.At the same time, you can view the details of these new students.
Every year freshmen are required to live on campus,So we developed the dormitory arrangement module,In this module we can see the dormitory number,宿捨類型.The building where the dormitory is located.Number of occupants and remaining beds.You and the new student you are being placed in, etc.
def xinshengxinxi_add(request):
'''
前台新增
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
req_dict = request.session.get("req_dict")
#獲取全部列名
columns= xinshengxinxi.getallcolumn( xinshengxinxi, xinshengxinxi)
try:
__authSeparate__=xinshengxinxi.__authSeparate__
except:
__authSeparate__=None
if __authSeparate__=="是":
tablename=request.session.get("tablename")
if tablename!="users" and 'userid' in columns:
try:
req_dict['userid']=request.session.get("params").get("id")
except:
pass
try:
__foreEndListAuth__=xinshengxinxi.__foreEndListAuth__
except:
__foreEndListAuth__=None
if __foreEndListAuth__ and __foreEndListAuth__!="否":
tablename=request.session.get("tablename")
if tablename!="users":
req_dict['userid']=request.session.get("params").get("id")
error= xinshengxinxi.createbyreq(xinshengxinxi,xinshengxinxi, req_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xinshengxinxi_thumbsup(request,id_):
'''
點贊:表屬性thumbsUp[是/否],刷表新增thumbsupnum贊和crazilynum踩字段,
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
req_dict = request.session.get("req_dict")
id_=int(id_)
type_=int(req_dict.get("type",0))
rets=xinshengxinxi.getbyid(xinshengxinxi,xinshengxinxi,id_)
update_dict={
"id":id_,
}
if type_==1:#贊
update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
elif type_==2:#踩
update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
error = xinshengxinxi.updatebyparams(xinshengxinxi,xinshengxinxi, update_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xinshengxinxi_info(request,id_):
'''
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
data = xinshengxinxi.getbyid(xinshengxinxi,xinshengxinxi, int(id_))
if len(data)>0:
msg['data']=data[0]
#浏覽點擊次數
try:
__browseClick__= xinshengxinxi.__browseClick__
except:
__browseClick__=None
if __browseClick__=="是" and "clicknum" in xinshengxinxi.getallcolumn(xinshengxinxi,xinshengxinxi):
try:
clicknum=int(data[0].get("clicknum",0))+1
except:
clicknum=0+1
click_dict={
"id":int(id_),"clicknum":clicknum}
ret=xinshengxinxi.updatebyparams(xinshengxinxi,xinshengxinxi,click_dict)
if ret!=None:
msg['code'] = crud_error_code
msg['msg'] = ret
return JsonResponse(msg)
def xinshengxinxi_detail(request,id_):
'''
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
data =xinshengxinxi.getbyid(xinshengxinxi,xinshengxinxi, int(id_))
if len(data)>0:
msg['data']=data[0]
#浏覽點擊次數
try:
__browseClick__= xinshengxinxi.__browseClick__
except:
__browseClick__=None
if __browseClick__=="是" and "clicknum" in xinshengxinxi.getallcolumn(xinshengxinxi,xinshengxinxi):
try:
clicknum=int(data[0].get("clicknum",0))+1
except:
clicknum=0+1
click_dict={
"id":int(id_),"clicknum":clicknum}
ret=xinshengxinxi.updatebyparams(xinshengxinxi,xinshengxinxi,click_dict)
if ret!=None:
msg['code'] = crud_error_code
msg['msg'] = retfo
return JsonResponse(msg)
def xinshengxinxi_update(request):
'''
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
req_dict = request.session.get("req_dict")
if req_dict.get("mima") and req_dict.get("password"):
if "mima" not in xinshengxinxi.getallcolumn(xinshengxinxi,xinshengxinxi) :
del req_dict["mima"]
if "password" not in xinshengxinxi.getallcolumn(xinshengxinxi,xinshengxinxi) :
del req_dict["password"]
try:
del req_dict["clicknum"]
except:
pass
error = xinshengxinxi.updatebyparams(xinshengxinxi, xinshengxinxi, req_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xinshengxinxi_delete(request):
'''
批量刪除
'''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data": {
}}
req_dict = request.session.get("req_dict")
error=xinshengxinxi.deletes(xinshengxinxi,
xinshengxinxi,
req_dict.get("ids")
)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xinshengxinxi_autoSort2(request):
if request.method in ["POST", "GET"]:
req_dict = request.session.get("req_dict")
cursor = connection.cursor()
leixing = set()
try:
cursor.execute("select inteltype from storeup where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'xinshengxinxi' order by addtime desc")
rows = cursor.fetchall()
for row in rows:
for item in row:
leixing.add(item)
except:
leixing = set()
L = []
cursor.execute("select * from xinshengxinxi where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from xinshengxinxi where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
desc = cursor.description
data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
for online_dict in data_dict:
for key in online_dict:
if 'datetime.datetime' in str(type(online_dict[key])):
online_dict[key] = online_dict[key].strftime(
"%Y-%m-%d %H:%M:%S")
else:
pass
L.append(online_dict)
return JsonResponse({
"code": 0, "msg": '', "data":{
"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})