分享一个基于Python的电子产品销售系统可视化销量统计java版本相同(源码+调试+开题+lw)

news2024/11/17 10:26:53

💕💕作者:计算机源码社
💕💕个人简介:本人七年开发经验,擅长Java、Python、PHP、.NET、微信小程序、爬虫、大数据等,大家有这一块的问题可以一起交流!
💕💕学习资料、程序开发、技术解答、文档报告
💕💕如需要源码,可以扫取文章下方二维码联系咨询

💕💕JavaWeb项目
💕💕微信小程序项目
💕💕Python项目
💕💕Android项目

文章目录

  • 1、项目介绍
  • 2、核心功能模块
  • 3、项目展示
  • 4、 核心代码

电子产品销售系统可视化系统 视频演示

如需要源码,可以扫取文章下方二维码联系咨询

1、项目介绍

  随着人们生活水平的高速发展,电子产品销售方面在近年来呈直线上升,人们也了解到电子产品的实用性,因此电子产品的销售数量也逐年递增,电子产品销售的增加加大了在管理上的工作难度。为了能更好的维护电子产品销售管理秩序,同时提高工作的效率、确保每一用户都能得到有效的保护,在进行全面调研、探求实际情况之后本人设计并实现了基于Python的电子产品销售系统可视化销量统计。
  基于Python的电子产品销售系统可视化销量统计采用了Python技术(也有Java技术,做了两版)、Django框架(SpringBoot ),连接MySQL数据库,具有较高的信息传输速率与较强的数据处理能力。包含管理员和用户两个层级的用户角色,系统管理员可以对个人中心、用户管理、产品类别管理、电子产品管理、留言板管理、系统管理、订单管理等功能进行详情,修改和删除操作;真正实现了管理工作的无纸化,并且还拥有角色及用户的添加与删除功能,可以很好的供所有用户使用。在对系统进行测试之后,确定可以实现所有预想的功能,并且可移植性强,可以很好的起到电子产品销售管理的作用。

2、核心功能模块

  
在这里插入图片描述
E-R图即实体-联系图,主要作用是提供了解显示数据类型存在的联系的途径,是藐视现实世界的概念模型,其关键要素是实体型、属性、联系。以下是本系统主要的实体图,如下图所示。
电子产品实体图
在这里插入图片描述
留言板实体图
在这里插入图片描述
购物车实体图
在这里插入图片描述
订单实体图

在这里插入图片描述

3、项目展示

在这里插入图片描述

当人们打开系统的网址后,首先看到的就是首页界面。在这里,人们能够看到系统的导航条,通过导航条导航进入各功能展示页面进行操作。系统首页界面如图所示:

在这里插入图片描述
电子产品:在电子产品页面的输入栏中输入产品名称、品牌和选择产品类别进行查询,可以查看到电子产品详细信息,并根据需要进行添加到购物车、立即购买、评论或收藏操作;电子产品页面如图所示:

在这里插入图片描述
购物车:在购物车页面可以查看到商品名称、图片、价格、数量、总价等详细信息,并进行点击购买或删除操作;购物车页面如图所示:
在这里插入图片描述
管理员点击电子产品管理。在电子产品页面输入产品名称、品牌和选择产品类别进行查询、新增或删除电子产品列表,并根据需要对电子产品详情信息进行详情、修改、查看评论或删除操作;如图所示:
在这里插入图片描述

4、 核心代码

#coding:utf-8
__author__ = "ila"
import base64, copy, logging, os, sys, time, xlrd, json, datetime, configparser
from django.http import JsonResponse
from django.apps import apps
from django.db.models.aggregates import Count,Sum
from .models import dianzichanpin
from util.codes import *
from util.auth import Auth
from util.common import Common
import util.message as mes
from django.db import connection
import random
from django.core.mail import send_mail
from django.conf import settings
from django.shortcuts import redirect
from django.db.models import Q
from util.baidubce_api import BaiDuBce
from .config_model import config

from alipay import AliPayConfig, AliPay


def dianzichanpin_register(request):
    if request.method in ["POST", "GET"]:
        msg = {'code': normal_code, "msg": mes.normal_code}
        req_dict = request.session.get("req_dict")


        error = dianzichanpin.createbyreq(dianzichanpin, dianzichanpin, req_dict)
        if error != None:
            msg['code'] = crud_error_code
            msg['msg'] = "用户已存在,请勿重复注册!"
        return JsonResponse(msg)


def dianzichanpin_login(request):
    if request.method in ["POST", "GET"]:
        msg = {'code': normal_code, "msg": mes.normal_code}
        req_dict = request.session.get("req_dict")

        datas = dianzichanpin.getbyparams(dianzichanpin, dianzichanpin, req_dict)
        if not datas:
            msg['code'] = password_error_code
            msg['msg'] = mes.password_error_code
            return JsonResponse(msg)
        try:
            __sfsh__= dianzichanpin.__sfsh__
        except:
            __sfsh__=None

        if  __sfsh__=='是':
            if datas[0].get('sfsh')!='是':
                msg['code']=other_code
                msg['msg'] = "账号已锁定,请联系管理员审核!"
                return JsonResponse(msg)
                
        req_dict['id'] = datas[0].get('id')
        return Auth.authenticate(Auth, dianzichanpin, req_dict)


def dianzichanpin_logout(request):
    if request.method in ["POST", "GET"]:
        msg = {
            "msg": "登出成功",
            "code": 0
        }

        return JsonResponse(msg)


def dianzichanpin_resetPass(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code}

        req_dict = request.session.get("req_dict")

        columns=  dianzichanpin.getallcolumn( dianzichanpin, dianzichanpin)

        try:
            __loginUserColumn__= dianzichanpin.__loginUserColumn__
        except:
            __loginUserColumn__=None
        username=req_dict.get(list(req_dict.keys())[0])
        if __loginUserColumn__:
            username_str=__loginUserColumn__
        else:
            username_str=username
        if 'mima' in columns:
            password_str='mima'
        else:
            password_str='password'

        init_pwd = '123456'
        recordsParam = {}
        recordsParam[username_str] = req_dict.get("username")
        records=dianzichanpin.getbyparams(dianzichanpin, dianzichanpin, recordsParam)
        if len(records)<1:
            msg['code'] = 400
            msg['msg'] = '用户不存在'
            return JsonResponse(msg)

        eval('''dianzichanpin.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
        
        return JsonResponse(msg)


def dianzichanpin_session(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}

        req_dict={"id":request.session.get('params').get("id")}
        msg['data']  = dianzichanpin.getbyparams(dianzichanpin, dianzichanpin, req_dict)[0]

        return JsonResponse(msg)


def dianzichanpin_default(request):

    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
        req_dict = request.session.get("req_dict")
        req_dict.update({"isdefault":"是"})
        data=dianzichanpin.getbyparams(dianzichanpin, dianzichanpin, req_dict)
        if len(data)>0:
            msg['data']  = data[0]
        else:
            msg['data']  = {}
        return JsonResponse(msg)


def dianzichanpin_page(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code,  "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
        req_dict = request.session.get("req_dict")

        #获取全部列名
        columns=  dianzichanpin.getallcolumn( dianzichanpin, dianzichanpin)

        #当前登录用户所在表
        tablename = request.session.get("tablename")


            #authColumn=list(__authTables__.keys())[0]
            #authTable=__authTables__.get(authColumn)

            # if authTable==tablename:
                #params = request.session.get("params")
                #req_dict[authColumn]=params.get(authColumn)

        '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
        try:
            __authSeparate__=dianzichanpin.__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

        #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
        #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
        try:
            __hasMessage__=dianzichanpin.__hasMessage__
        except:
            __hasMessage__=None
        if  __hasMessage__=="是":
            tablename=request.session.get("tablename")
            if tablename!="users":
                req_dict["userid"]=request.session.get("params").get("id")



        # 判断当前表的表属性isAdmin,为真则是管理员表
        # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
        __isAdmin__ = None

        allModels = apps.get_app_config('main').get_models()
        for m in allModels:
            if m.__tablename__==tablename:

                try:
                    __isAdmin__ = m.__isAdmin__
                except:
                    __isAdmin__ = None
                break

        # 当前表也是有管理员权限的表
        if  __isAdmin__ == "是" and 'dianzichanpin' != 'forum':
            if req_dict.get("userid") and 'dianzichanpin' != 'chat':
                del req_dict["userid"]

        else:
            #非管理员权限的表,判断当前表字段名是否有userid
            if tablename!="users" and 'dianzichanpin'[:7]!='discuss'and "userid" in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin):
                req_dict["userid"] = request.session.get("params").get("id")

        #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
        try:
            __authTables__=dianzichanpin.__authTables__
        except:
            __authTables__=None

        if __authTables__!=None and  __authTables__!={}:
            try:
                del req_dict['userid']
                # tablename=request.session.get("tablename")
                # if tablename=="users":
                    # del req_dict['userid']
            except:
                pass
            for authColumn,authTable in __authTables__.items():
                if authTable==tablename:
                    params = request.session.get("params")
                    req_dict[authColumn]=params.get(authColumn)
                    username=params.get(authColumn)
                    break
        q = Q()
        msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
        msg['data']['pageSize']  =dianzichanpin.page(dianzichanpin, dianzichanpin, req_dict, request, q)

        return JsonResponse(msg)


def dianzichanpin_autoSort(request):
    '''
    .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code,  "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
        req_dict = request.session.get("req_dict")
        if "clicknum"  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin):
            req_dict['sort']='clicknum'
        elif "browseduration"  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin):
            req_dict['sort']='browseduration'
        else:
            req_dict['sort']='clicktime'
        req_dict['order']='desc'
        msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
        msg['data']['pageSize']  = dianzichanpin.page(dianzichanpin,dianzichanpin, req_dict)

        return JsonResponse(msg)


def dianzichanpin_list(request):
    '''
    前台分页
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code,  "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
        req_dict = request.session.get("req_dict")
        if req_dict.__contains__('vipread'):
            del req_dict['vipread']

        #获取全部列名
        columns=  dianzichanpin.getallcolumn( dianzichanpin, dianzichanpin)
        #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
        try:
            __foreEndList__=dianzichanpin.__foreEndList__
        except:
            __foreEndList__=None

        if __foreEndList__=="前要登":
            tablename=request.session.get("tablename")
            if tablename!="users" and 'userid' in columns:
                try:
                    req_dict['userid']=request.session.get("params").get("id")
                except:
                    pass
        #forrEndListAuth
        try:
            __foreEndListAuth__=dianzichanpin.__foreEndListAuth__
        except:
            __foreEndListAuth__=None


        #authSeparate
        try:
            __authSeparate__=dianzichanpin.__authSeparate__
        except:
            __authSeparate__=None

        if __foreEndListAuth__ =="是" and __authSeparate__=="是":
            tablename=request.session.get("tablename")
            if tablename!="users":
                req_dict['userid']=request.session.get("params",{"id":0}).get("id")

        tablename = request.session.get("tablename")
        if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
            del req_dict["userid"]
        else:
            __isAdmin__ = None

            allModels = apps.get_app_config('main').get_models()
            for m in allModels:
                if m.__tablename__==tablename:

                    try:
                        __isAdmin__ = m.__isAdmin__
                    except:
                        __isAdmin__ = None
                    break

            if __isAdmin__ == "是":
                if req_dict.get("userid"):
                    # del req_dict["userid"]
                    pass
            else:
                #非管理员权限的表,判断当前表字段名是否有userid
                if "userid" in columns:
                    try:
                        # 本接口可以匿名访问,所以try判断是否为匿名
                        # req_dict['userid']=request.session.get("params").get("id")
                        pass
                    except:
                            pass
        #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
        try:
            __authTables__=dianzichanpin.__authTables__
        except:
            __authTables__=None

        if __authTables__!=None and  __authTables__!={} and __foreEndListAuth__=="是":
            try:
                del req_dict['userid']
            except:
                pass
            for authColumn,authTable in __authTables__.items():
                if authTable==tablename:
                    params = request.session.get("params")
                    req_dict[authColumn]=params.get(authColumn)
                    username=params.get(authColumn)
                    break
        
        if dianzichanpin.__tablename__[:7]=="discuss":
            try:
                del req_dict['userid']
            except:
                pass
        q = Q()
        msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
        msg['data']['pageSize']  = dianzichanpin.page(dianzichanpin, dianzichanpin, req_dict, request, q)

        return JsonResponse(msg)


def dianzichanpin_save(request):
    '''
    后台新增
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
        req_dict = request.session.get("req_dict")
        if 'clicktime' in req_dict.keys():
            del req_dict['clicktime']
        tablename=request.session.get("tablename")
        __isAdmin__ = None
        allModels = apps.get_app_config('main').get_models()
        for m in allModels:
            if m.__tablename__==tablename:

                try:
                    __isAdmin__ = m.__isAdmin__
                except:
                    __isAdmin__ = None
                break

        #获取全部列名
        columns=  dianzichanpin.getallcolumn( dianzichanpin, dianzichanpin)
        if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns  and __isAdmin__!='是':
            params=request.session.get("params")
            req_dict['userid']=params.get('id')
        if 'addtime' in req_dict.keys():
            del req_dict['addtime']
        error= dianzichanpin.createbyreq(dianzichanpin,dianzichanpin, req_dict)
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error

        return JsonResponse(msg)


def dianzichanpin_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=  dianzichanpin.getallcolumn( dianzichanpin, dianzichanpin)
        try:
            __authSeparate__=dianzichanpin.__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__=dianzichanpin.__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")
        if 'addtime' in req_dict.keys():
            del req_dict['addtime']
        error= dianzichanpin.createbyreq(dianzichanpin,dianzichanpin, req_dict)
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_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=dianzichanpin.getbyid(dianzichanpin,dianzichanpin,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 = dianzichanpin.updatebyparams(dianzichanpin,dianzichanpin, update_dict)
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_info(request,id_):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}

        data = dianzichanpin.getbyid(dianzichanpin,dianzichanpin, int(id_))
        if len(data)>0:
            msg['data']=data[0]
            if msg['data'].__contains__("reversetime"):
                msg['data']['reversetime'] = msg['data']['reversetime'].strftime("%Y-%m-%d %H:%M:%S")
        #浏览点击次数
        try:
            __browseClick__= dianzichanpin.__browseClick__
        except:
            __browseClick__=None

        if __browseClick__=="是"  and  "clicknum"  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin):
            try:
                clicknum=int(data[0].get("clicknum",0))+1
            except:
                clicknum=0+1
            click_dict={"id":int(id_),"clicknum":clicknum}
            ret=dianzichanpin.updatebyparams(dianzichanpin,dianzichanpin,click_dict)
            if ret!=None:
                msg['code'] = crud_error_code
                msg['msg'] = ret
        return JsonResponse(msg)


def dianzichanpin_detail(request,id_):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}

        data =dianzichanpin.getbyid(dianzichanpin,dianzichanpin, int(id_))
        if len(data)>0:
            msg['data']=data[0]
            if msg['data'].__contains__("reversetime"):
                msg['data']['reversetime'] = msg['data']['reversetime'].strftime("%Y-%m-%d %H:%M:%S")

        #浏览点击次数
        try:
            __browseClick__= dianzichanpin.__browseClick__
        except:
            __browseClick__=None

        if __browseClick__=="是"   and  "clicknum"  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin):
            try:
                clicknum=int(data[0].get("clicknum",0))+1
            except:
                clicknum=0+1
            click_dict={"id":int(id_),"clicknum":clicknum}

            ret=dianzichanpin.updatebyparams(dianzichanpin,dianzichanpin,click_dict)
            if ret!=None:
                msg['code'] = crud_error_code
                msg['msg'] = retfo
        return JsonResponse(msg)


def dianzichanpin_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 "mima" not in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin) :
            del req_dict["mima"]
        if req_dict.get("password") and "password" not in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin) :
            del req_dict["password"]
        try:
            del req_dict["clicknum"]
        except:
            pass


        error = dianzichanpin.updatebyparams(dianzichanpin, dianzichanpin, req_dict)
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_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=dianzichanpin.deletes(dianzichanpin,
            dianzichanpin,
             req_dict.get("ids")
        )
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_vote(request,id_):
    '''
    浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
统计商品或新闻的点击次数;提供新闻的投票功能
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code}


        data= dianzichanpin.getbyid(dianzichanpin, dianzichanpin, int(id_))
        for i in data:
            votenum=i.get('votenum')
            if votenum!=None:
                params={"id":int(id_),"votenum":votenum+1}
                error=dianzichanpin.updatebyparams(dianzichanpin,dianzichanpin,params)
                if error!=None:
                    msg['code'] = crud_error_code
                    msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_importExcel(request):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": {}}

        excel_file = request.FILES.get("file", "")
        file_type = excel_file.name.split('.')[1]
        
        if file_type in ['xlsx', 'xls']:
            data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
            table = data.sheets()[0]
            rows = table.nrows
            
            try:
                for row in range(1, rows):
                    row_values = table.row_values(row)
                    req_dict = {}
                    dianzichanpin.createbyreq(dianzichanpin, dianzichanpin, req_dict)
                    
            except:
                pass
                
        else:
            msg = {
                "msg": "文件类型错误",
                "code": 500
            }
                
        return JsonResponse(msg)


def dianzichanpin_sendemail(request):
    if request.method in ["POST", "GET"]:
        req_dict = request.session.get("req_dict")

        code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
        to = []
        to.append(req_dict['email'])

        send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)

        cursor = connection.cursor()
        cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")

        msg = {
            "msg": "发送成功",
            "code": 0
        }

        return JsonResponse(msg)


# 推荐算法接口
def dianzichanpin_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 = 'dianzichanpin' order by addtime desc")
            rows = cursor.fetchall()
            for row in rows:
                for item in row:
                    if item != None:
                        leixing.add(item)
        except:
            leixing = set()
        
        L = []
        cursor.execute("select * from dianzichanpin where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from dianzichanpin 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:int(req_dict["limit"])]}})


# (按值统计)时间统计类型
def dianzichanpin_value(request, xColumnName, yColumnName, timeStatType):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": {}}
        
        where = ' where 1 = 1 '
        sql = ''
        if timeStatType == '日':
            sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d') LIMIT 10".format(xColumnName, yColumnName, where, '%Y-%m-%d')

        if timeStatType == '月':
            sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y-%m') LIMIT 10".format(xColumnName, yColumnName, where, '%Y-%m')

        if timeStatType == '年':
            sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y') LIMIT 10".format(xColumnName, yColumnName, where, '%Y')

        L = []
        cursor = connection.cursor()
        cursor.execute(sql)
        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)
        msg['data'] = L
        return JsonResponse(msg)


# 按值统计
def dianzichanpin_o_value(request, xColumnName, yColumnName):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": {}}
        
        where = ' where 1 = 1 '

        sql = "SELECT {0}, sum({1}) AS total FROM dianzichanpin {2} GROUP BY {0} LIMIT 10".format(xColumnName, yColumnName, where)
        L = []
        cursor = connection.cursor()
        cursor.execute(sql)
        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)
        msg['data'] = L
        return JsonResponse(msg)

# (按值统计)时间统计类型(多)
def dianzichanpin_valueMul(request, xColumnName, timeStatType):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": []}

        req_dict = request.session.get("req_dict")

        where = ' where 1 = 1 '

        for item in req_dict['yColumnNameMul'].split(','):
            sql = ''
            if timeStatType == '日':
                sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d') LIMIT 10".format(xColumnName, item, where, '%Y-%m-%d')

            if timeStatType == '月':
                sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y-%m') LIMIT 10".format(xColumnName, item, where, '%Y-%m')

            if timeStatType == '年':
                sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM dianzichanpin {2} GROUP BY DATE_FORMAT({0}, '%Y') LIMIT 10".format(xColumnName, item, where, '%Y')

            L = []
            cursor = connection.cursor()
            cursor.execute(sql)
            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)
            msg['data'].append(L)
        return JsonResponse(msg)

# (按值统计(多))
def dianzichanpin_o_valueMul(request, xColumnName):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": []}

        req_dict = request.session.get("req_dict")

        where = ' where 1 = 1 '

        for item in req_dict['yColumnNameMul'].split(','):
            sql = "SELECT {0}, sum({1}) AS total FROM dianzichanpin {2} GROUP BY {0} LIMIT 10".format(xColumnName, item, where)
            L = []
            cursor = connection.cursor()
            cursor.execute(sql)
            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)
            msg['data'].append(L)

        return JsonResponse(msg)


def dianzichanpin_count(request):
    '''
    总数接口
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": {}}
        req_dict = request.session.get("req_dict")
        where = ' where 1 = 1 '
        for key in req_dict:
            if req_dict[key] != None:
                where = where + " and key like '{0}'".format(req_dict[key])

        sql = "SELECT count(*) AS count FROM dianzichanpin {0}".format(where)
        count = 0
        cursor = connection.cursor()
        cursor.execute(sql)
        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:
            count = online_dict['count']
        msg['data'] = count

        return JsonResponse(msg)


def dianzichanpin_group(request, columnName):
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": "成功", "data": {}}

        where = ' where 1 = 1 '

        sql = "SELECT COUNT(*) AS total, " + columnName + " FROM dianzichanpin " + where + " GROUP BY " + columnName + " LIMIT 10"

        L = []
        cursor = connection.cursor()
        cursor.execute(sql)
        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")
                else:
                    pass
            L.append(online_dict)
        msg['data'] = L
        return JsonResponse(msg)


def dianzichanpin_groupby(request):
    '''
    管理员用户:当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
        req_dict = request.session.get("req_dict")

        #处理参数
        try:
            page1 = int(req_dict.get("page"))
        except:
            page1 = 1
        try:
            limit1 = int(req_dict.get("limit"))
        except:
            limit1 = 10

        #值为"是"仅能查看自己的记录和add接口后台赋值userid的值
        try:
            __authSeparate__ = dianzichanpin.__authSeparate__
        except:
            __authSeparate__ = None

        # print(dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin))
        if __authSeparate__=="是":
            #print("req_dict==============>",req_dict)
            #如果当前表有userid字段,且通过身份认证
            if "userid"  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin) and request.session.get("params")!=None:
                #参数增加userid
                req_dict["userid"]=request.session.get("params").get("id")
        #如果当前表没有userid字段,且参数里有userid键值对
        if  "userid" not  in dianzichanpin.getallcolumn(dianzichanpin,dianzichanpin) and "userid" in list(req_dict.keys()):
            #删除参数userid
            del req_dict["userid"]
        try:
            del req_dict["page"]
            del req_dict["limit"]
        except:
            pass
        tablename=request.session.get("tablename")
        if tablename=="users" and req_dict.get("userid")!=None:
            del req_dict["userid"]
        else:
            #判断当前登陆表是否具有管理员权限
            __isAdmin__ = None

            allModels = apps.get_app_config('main').get_models()
            for m in allModels:
                if m.__tablename__==tablename:

                    try:
                        __isAdmin__ = m.__isAdmin__
                    except:
                        __isAdmin__ = None
                    break

            #是,则删除userid参数
            if __isAdmin__=="是":
                del req_dict["userid"]
            else:
                #否,则赋值userid参数
                req_dict["userid"]=request.session.get("params").get("id")
        print("req_dict===========>",req_dict)
        #20200928 去掉总记录数查询.因为只有一条记录,所以总记录数从查询所的记录获取
        #本次查询所有,求总记录数
        # alldata = dianzichanpin.objects.filter(**req_dict). \
        #     annotate(userids=Count('userid'),paperids=Count('paperid'),papernames=Count('papername')). \
        #         values("userid", "paperid", "papername","myscore","userids"). \
        #         all()
        # print("alldata=============>",alldata)
        # print("alldata=============>",alldata.  aggregate(myscore=Sum('myscore')))

        #本次分页查询
        start=limit1 * (page1 - 1)
        end=limit1 * (page1 - 1)+limit1+1
        datas = dianzichanpin.objects.filter(**req_dict).\
                    annotate(userids=Count('userid'),usernames=Count('username'),paperids=Count('paperid'),papernames=Count('papername')). \
                values("userid", "username", "paperid", "papername","myscore"). \
                    all()[start:end]
        print("datas=============>", datas)
        print("datas=============>", datas.aggregate(myscore=Sum('myscore')))

        #处理分页查询所得数据
        try:
            data = [model_to_dict(i) for i in datas]
        except:
            data = datas
        dataDict = {}
        for i in data:
            keyName1="{}#{}#{}#{}".format(i.get("userid"),i.get("username"),i.get("paperid"),i.get("papername"))
            if dataDict.get(keyName1)==None:
                dataDict[keyName1]={"userid":i.get("userid"),"username":i.get("username"),"paperid":i.get("paperid"),"papername":i.get("papername"),"myscore":i.get("myscore")}
            else:
                dataDict[keyName1]["myscore"]=dataDict.get(keyName1).get("myscore")+i.get("myscore")

        #赋值分页查询所得数据
        dataList =list(dataDict.values())

        # 处理所有查询,计算总页数
        total = len(dataList)
        try:
            div = divmod(total, limit1)
            if div[1] > 0:
                totalPage = div[0] + 1
            else:
                totalPage = div[0]
        except:
            totalPage = 1

        # 赋值分页参数
        msg["data"] = {"pageSize": limit1,
                       "total": total,
                       "totalPage": totalPage,
                       "currPage": page1,
                       "list":dataList
                       }

        return JsonResponse(msg)


def dianzichanpin_deleterecords(request):
    '''
    按键值对参数添加删除记录
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code}
        req_dict = request.session.get("req_dict")
        error=dianzichanpin.deletebyparams(dianzichanpin,dianzichanpin,req_dict)
        if error!=None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def dianzichanpin_flist(request):
    '''
    查看所有开放的帖列表(无需登录)
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code,  "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
        req_dict = request.session.get("req_dict")

        msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
        msg['data']['pageSize'] = dianzichanpin.page(dianzichanpin, dianzichanpin, req_dict)

        return JsonResponse(msg)


def dianzichanpin_list_id(request,id_):
    '''
    查看主贴和所有回帖内容(无需登录)
    '''
    if request.method in ["POST", "GET"]:
        msg = {"code": normal_code, "msg": mes.normal_code, "data": {"currPage":1,"totalPage":1,"total":1,"pageSize":10,"childs":[]},"id":int(id_)}

        params = {"id":int(id_)}

        datas = dianzichanpin.retrieve(dianzichanpin, dianzichanpin)


        parent_id=0#当前id,也就是parent_id,找到了下一级,把下一级id赋值给current_id,当做下下一级id的paretn_id
        current_id=0
        start_index=0

        #获取parentid
        for index,i in enumerate(datas):
            if i.get('id')==params.get('id'):
                current_id=parent_id=i.get('id')
                start_index=index
                msg['data'].update(i)
                break

        #把疑似回帖的id放进ids数组
  
        id_data_dict={}#id和详情的键值对
        for i in datas:
            id_data_dict[i.get('id')]=i
        
        dict1={}#部分层级,只获取上下级关系
        for v in id_data_dict.values():
            parentid_=copy.deepcopy(v.get("parentid"))

            id_=copy.deepcopy(v.get("id"))
            if dict1.get(parentid_)==None:
                dict1[parentid_]=[]
            dict1[parentid_].append(id_)


        childs=[]#msg.data.childs
        #填充第一层回帖
        for i  in dict1.get(parent_id,[]):
            child1=copy.deepcopy(id_data_dict.get(i))

            #填充第二层回帖
            if dict1.get(i)!=None:#判断第二次是否还有回帖
                child2=[]
                for j in  dict1.get(i):
                    child3=copy.deepcopy(id_data_dict.get(j))
                    id_=copy.deepcopy(child3.get("id"))

                    if dict1.get(id_)!=None:#判断第三次是否还有回帖
                        child3["childs"]=[]
                        for k in dict1.get(id_):
                            child4=copy.deepcopy(id_data_dict.get(k))
                            id__=copy.deepcopy(child4.get("id"))

                            if dict1.get(id__)!=None:#判断第四次是否还有回帖
                                child4['childs']=[]
                                for l in dict1.get(id__):
                                    child5=copy.deepcopy(id_data_dict.get(l))
                                    id___=copy.deepcopy(child5.get("id"))

                                    if dict1.get(id___)!=None:#判断第五次是否还有回帖
                                        child5['childs']=[]
                                        for m in dict1.get(id___):
                                            child6=copy.deepcopy(id_data_dict.get(m))
                                            id____=copy.deepcopy(child6.get("id"))

                                            if dict1.get(id____)!=None:#判断第六次是否还有回帖
                                                child6['childs']=[]
                                                child7=copy.deepcopy(id_data_dict.get(m))
                                                child7['childs']=[]
                                                for n in dict1.get(id____):
                                                    child7['childs'].append(id_data_dict.get(n))

                                                child6['childs'].append(child7)

                                        child5['childs'].append(child6)

                                child4["childs"].append(child5)

                        child3["childs"].append(child4)

                    child2.append(child3)
                child1['childs']=child2
            else:
                child1['childs']=None

            childs.append(child1)
        print(childs)
        msg['data']['childs']=childs
        return JsonResponse(msg)


def dianzichanpin_alipay(request):
    if request.method in ["POST", "GET"]:
        alipay = AliPay(
            appid=settings.ALIPAY_APP_ID,
            app_notify_url=None,
            app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
            alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
            sign_type=settings.ALIPAY_SIGN_TYPE,
            debug=True,
            config=AliPayConfig(timeout=15)
        )

        req_dict = request.session.get("req_dict")

        order_string = alipay.api_alipay_trade_page_pay(
            out_trade_no=req_dict['tradeno'],
            total_amount=req_dict['totalamount'],
            subject=req_dict['subject'],
            return_url='http://127.0.0.1:8080/djangogqon2/dianzichanpin/notify',
            #notify_url=''
        )
        pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
        pay_url = '<form name="punchout_form" method="post" action="{0}"><input type="hidden" name="biz_content" ><input type="submit" value="立即支付" style="display: none"></form>'.format(pay_url)

        return JsonResponse({'code': 0, "data": pay_url})


def dianzichanpin_notify(request):
    if request.method in ["POST", "GET"]:
        req_dict = request.session.get("req_dict")
        out_trade_no = req_dict['out_trade_no']
        cursor = connection.cursor()

        return redirect('http://127.0.0.1:8080/djangogqon2/admin/dist/index.html#/dianzichanpin')

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1032897.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

windows 部署 mindspore GPU 开发环境

基础环境 windows 环境&#xff1a; Windows 11 版本&#xff1a;22H2操作系统版本&#xff1a;22621.2283 wsl2&#xff1a; 1.2.5.0 Docker Desktop&#xff1a; Docker Desktop 4.23.0 CUDA driver for WSL 版本&#xff1a; 535.104.07 宿主机上的 nvidia 环境如下所示&a…

【李沐深度学习笔记】矩阵计算(4)

课程地址和说明 线性代数实现p4 本系列文章是我学习李沐老师深度学习系列课程的学习笔记&#xff0c;可能会对李沐老师上课没讲到的进行补充。 本节是第四篇&#xff0c;由于CSDN限制&#xff0c;只能被迫拆分 矩阵计算 矩阵的导数运算 向量对向量求导的基本运算规则 已知…

如何实现线程池之间的数据透传 ?

如何实现线程池之间的数据透传 &#xff1f; 引言transmittable-thread-local概览capture如何 capture如何保存捕获的数据 save 和 replayrestore 小结 引言 当我们涉及到数据的全链路透传场景时&#xff0c;通常会将数据存储在线程的本地缓存中&#xff0c;如: 用户认证信息透…

灾备系统中的多线程传输功能

多线程传输是指同时使用多个线程进行文件传输&#xff0c;使多个数据包可以同时传输&#xff0c;从而充分利用网络带宽的最大值&#xff0c;提高传输速度。 正常的IE页面文件下载与上传都只有一个线程&#xff0c;有些软件可以实现多线程文件传输&#xff0c;就好像在传输文件…

JDK21你可以不用,新特性还是要了解的

大家好&#xff0c;我是风筝 今年6月份的时候&#xff0c;写过一篇JDK21引入协程&#xff0c;再也不用为并发而头疼了&#xff0c;那时候只是预览版&#xff0c;终于&#xff0c;前两天&#xff08;2023年9月19日&#xff09;发布了 JDK21 正式版。 老早就在 YouTube 上订阅了…

在电脑上怎么分类管理笔记?支持分类整理的电脑云笔记软件

对于大多数上班族而言&#xff0c;在使用电脑办公时&#xff0c;随手记录工作笔记是一个非常常见的场景。无论是会议纪要、工作总结还是项目计划&#xff0c;记录下每一次思考和灵感是提高工作效率的关键。然而&#xff0c;随着时间的推移&#xff0c;电脑上记录的笔记内容逐渐…

OceanMind海睿思入选弯弓研究院《2023中国营销技术生态图谱8.0》

近日&#xff0c;由国内MarTech领域知名机构 弯弓研究院 主办的第五届营销数字化大会暨营销科技MarTech交易展在广州成功召开。 本次大会发布了《2023中国营销技术生态图谱8.0版》 (以下简称“弯弓图谱8.0”)&#xff0c;中新赛克海睿思 凭借成熟的技术实力成功入选弯弓图谱8.0…

K-最近邻算法

一、说明 KNN算法是一个分类算法&#xff0c;基本数学模型是距离模型。K-最近邻是一种超级简单的监督学习算法。它可以应用于分类和回归问题。虽然它是在 1950 年代引入的&#xff0c;但今天仍在使用。然而如何实现&#xff0c;本文将给出具体描述。 来源&#xff1a;维基百科 …

Docker 安装Redis(集群)

3主3从redis集群配置 1、新建6个docker容器 redis 实例 docker run -d --name redis-node-1 --net host --privilegedtrue -v /data/redis/share/redis-node-1:/data redis:6.0.8 --cluster-enabled yes --appendonly yes --port 6381 docker run -d --name redis-node-2 --ne…

Fiddler抓取Https请求配置

官网&#xff1a;https://www.telerik.com/fiddler 配置抓取https包 1.Tools->Options->Https&#xff0c;勾选下面。 2.Actions ->Trust Root Certificate.安装证书到本地 3.在手机端设置代理&#xff1a;本机ip如&#xff1a;192.168.1.168 端口号:8888。 4.手机…

有一个新工具,能让程序员变成高手,优雅撸它!

不知道从什么时候开始&#xff0c;程序员这个职位变得家喻户晓&#xff0c;对程序员的印象也从以前的高深莫测变成如今的加班代名词。对于程序员加班&#xff0c;不懂有话要说。 作为大厂的一枚螺丝钉&#xff0c;接到任务的第一时间需要缕清底层逻辑&#xff0c;并随时关注部门…

【2603. 收集树中金币】

来源&#xff1a;力扣&#xff08;LeetCode&#xff09; 描述&#xff1a; 给你一个 n 个节点的无向无根树&#xff0c;节点编号从 0 到 n - 1 。给你整数 n 和一个长度为 n - 1 的二维整数数组 edges &#xff0c;其中 edges[i] [ai, bi] 表示树中节点 ai 和 bi 之间有一条…

基于SpringBoot的网上超市系统的设计与实现

目录 前言 一、技术栈 二、系统功能介绍 管理员功能实现 用户功能实现 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 网络技术和计算机技术发展至今&#xff0c;已经拥有了深厚的理论基础&#xff0c;并在现实中进行了充分运用&#xff0c;尤其是基于计…

【Java 基础篇】Java网络编程:下载进度监控实现详解

文件下载是许多应用程序的重要功能&#xff0c;而下载进度监控是提高用户体验的关键。在本文中&#xff0c;我们将详细介绍如何使用Java实现文件下载进度监控&#xff0c;以便用户可以实时了解文件下载的进度。 什么是下载进度监控 下载进度监控是一种用户界面元素或功能&…

真白给,太好考了!大爆冷+扩招!

一、学校及专业介绍 太原科技大学&#xff08;Taiyuan University of Science and Technology)位于山西省太原市&#xff0c;入选了国家中西部高校基础能力建设工程、教育部数据中国“百校工程”&#xff0c;教育部首批新工科研究与实践项目实施高校。 1.1 招生情况 太原科技…

【word格式】mathtype公式插入 | 段落嵌入后格式对齐 | 字体大小调整 |空心字体

1. 公式嵌入 推荐在线latex编辑器&#xff0c;可以截图转 latex 识别率很高 https://www.latexlive.com/home 美中不足&#xff0c;不开会员每天只能用3次识别。 通过公式识别后&#xff0c;输出选择align环境&#xff0c;然后在mathtype中直接粘贴latex就可以转好。 2.公式…

在线人才测评,招聘技术研发类岗位的人才测评方案

企业的发展离不开技术创新&#xff0c;与其他岗位的员工相比&#xff0c;研发岗位创造性强&#xff0c;较为独立&#xff0c;技术专业度高&#xff0c;对研发技术类岗位的招聘&#xff0c;不仅仅是在专业能力方面做要求&#xff0c;还需要从人员素质&#xff0c;潜在能力方面入…

解决方案:TSINGSEE青犀+智能分析网关助力智慧仓储智能化监管

为全面保障物流仓储的安全性与完整性&#xff0c;解决仓库管理难题&#xff0c;优化物流仓储方式&#xff0c;提升仓储效率&#xff0c;降低人工成本&#xff0c;旭帆科技推出智慧仓储AI视频智能分析方案&#xff0c;利用物联网、大数据、云计算等技术&#xff0c;对仓储管理进…

图像形态学操作(连通性、腐蚀、膨胀)

相关概念 形态学操作-腐蚀 参数&#xff1a; img: 要处理的图像kernal :核结构iteration &#xff1a;腐蚀的次数&#xff0c;默认是1 形态学操作-膨胀 参数&#xff1a; img : 要处理的图像kernal : 核结构iteration : 膨胀的次数&#xff0c;默认为1 import cv2 as cv im…

推荐几款实用的项目进度管理软件

做好项目的进度管理是项目经理的重要职责&#xff0c;在这个过程中&#xff0c;并非单凭人力就可以把控。项目进度管理软件出现&#xff0c;成为人们在项目管理过程中最需要的工具之一。一个项目无论大小&#xff0c;都需要一款高效且实用的项目管理工具&#xff0c;对项目流程…