每年都有大量的新生需要報到,但是很多時候因為是第一次到本校進行報到,不知道具體的報到流程和學校的安排,如果挨個的去通知無形之間會給工作人員增加工作量,目前最好的辦法就是開發一套新生報到系統,讓新生可以自己去查看具體的工作流程和安排
本系統根據實際需要分為管理人員和新生用戶兩個部分具體功能如下,
計算機畢業設計Python+djang的新生報到服務管理系統(源碼+系統+mysql數據庫+Lw文檔)
開發語言:Python
python框架:django
軟件版本:python3.7/python3.8
數據庫:mysql 5.7或更高版本
數據庫工具:Navicat11
開發軟件:PyCharm/vs code
前端框架:vue.js
可開發框架:ssm/Springboot/vue/python/PHP/小程序/安卓均可開發
本界面為系統登錄界面,在本界面中管理人員和用戶都可以在這裡面進行登錄,同時如果新用戶沒有賬號的話,還可以進行注冊
管理人員在登錄之後可以對系統的用戶進行管理。用戶信息主要包括用戶的賬號,用戶的密碼,姓名。電話以及頭像,管理人員可以對用戶進行修改和刪除,同時可以查看用戶的詳細信息。
管理人員除了對用戶進行管理之外,還可以對每年的新生進行管理新生管理主要包括新生的賬號,新生的姓名,性別。學號,報道時間,分數以及學生生源地等信息。管理人員在本模塊中可以對新生信息進行修改和刪除。同時可以查看這些新生的詳細信息。
對於每年的新生來說都是要進行住校的,所以我們開發了宿捨安排模塊兒,在本模塊中我們可以看到宿捨號,宿捨類型。宿捨所在的樓棟。可住人數以及剩余床位。你和被安排的新生等內容。
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]}})