建设公司网站编号江都住房和建设局网站

pingmian/2025/10/8 2:54:25/文章来源:
建设公司网站编号,江都住房和建设局网站,制作app的公司是什么公司,网站点击量在哪里看目录 前言 一、技术栈 二、系统功能介绍 员工信息管理 预案信息管理 预案类型统计 事件类型管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 随着信息技术在管理上越来越深入而广泛的应用#xff0c;管理信息系统的实施在技术上已逐步成熟。本文介绍…目录 前言 一、技术栈 二、系统功能介绍 员工信息管理 预案信息管理 预案类型统计 事件类型管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 随着信息技术在管理上越来越深入而广泛的应用管理信息系统的实施在技术上已逐步成熟。本文介绍了大型商场应急预案管理系统的开发全过程。通过分析大型商场应急预案管理系统管理的不足创建了一个计算机管理大型商场应急预案管理系统的方案。文章介绍了大型商场应急预案管理系统的系统分析部分包括可行性分析等系统设计部分主要介绍了系统功能设计和数据库设计。 本大型商场应急预案管理系统管理员功能有个人中心员工管理预案信息管理预案类型管理事件类型管理预案类型统计管理事件类型统计管理应急预案管理。员工可以查看各种预案信息。因而具有一定的实用性。 本站是一个B/S模式系统采用Spring Boot框架MYSQL数据库设计开发充分保证系统的稳定性。系统具有界面清晰、操作简单功能齐全的特点使得大型商场应急预案管理系统管理工作系统化、规范化。本系统的使用使管理人员从繁重的工作中解脱出来实现无纸化办公能够有效的提高大型商场应急预案管理系统管理效率。 一、技术栈 末尾获取源码 SpringBootVueJS jQueryAjax... 二、系统功能介绍 员工信息管理 管理员可以管理员工可以对员工信息修改删除以及查询操作。 预案信息管理 系统管理员可以对预案信息进行添加修改删除以及查询操作。 预案类型统计 系统管理员可以对预案类型统计。 事件类型管理 管理员可以对事件类型进行添加修改删除统计操作。 三、核心代码 1、登录模块 package com.controller;import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.entity.TokenEntity; import com.entity.UserEntity; import com.service.TokenService; import com.service.UserService; import com.utils.CommonUtil; import com.utils.MD5Util; import com.utils.MPUtil; import com.utils.PageUtils; import com.utils.R; import com.utils.ValidatorUtils;/*** 登录相关*/ RequestMapping(users) RestController public class UserController{Autowiredprivate UserService userService;Autowiredprivate TokenService tokenService;/*** 登录*/IgnoreAuthPostMapping(value /login)public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user userService.selectOne(new EntityWrapperUserEntity().eq(username, username));if(usernull || !user.getPassword().equals(password)) {return R.error(账号或密码不正确);}String token tokenService.generateToken(user.getId(),username, users, user.getRole());return R.ok().put(token, token);}/*** 注册*/IgnoreAuthPostMapping(value /register)public R register(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapperUserEntity().eq(username, user.getUsername())) !null) {return R.error(用户已存在);}userService.insert(user);return R.ok();}/*** 退出*/GetMapping(value logout)public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok(退出成功);}/*** 密码重置*/IgnoreAuthRequestMapping(value /resetPass)public R resetPass(String username, HttpServletRequest request){UserEntity user userService.selectOne(new EntityWrapperUserEntity().eq(username, username));if(usernull) {return R.error(账号不存在);}user.setPassword(123456);userService.update(user,null);return R.ok(密码已重置为123456);}/*** 列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params,UserEntity user){EntityWrapperUserEntity ew new EntityWrapperUserEntity();PageUtils page userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put(data, page);}/*** 列表*/RequestMapping(/list)public R list( UserEntity user){EntityWrapperUserEntity ew new EntityWrapperUserEntity();ew.allEq(MPUtil.allEQMapPre( user, user)); return R.ok().put(data, userService.selectListView(ew));}/*** 信息*/RequestMapping(/info/{id})public R info(PathVariable(id) String id){UserEntity user userService.selectById(id);return R.ok().put(data, user);}/*** 获取用户的session用户信息*/RequestMapping(/session)public R getCurrUser(HttpServletRequest request){Long id (Long)request.getSession().getAttribute(userId);UserEntity user userService.selectById(id);return R.ok().put(data, user);}/*** 保存*/PostMapping(/save)public R save(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapperUserEntity().eq(username, user.getUsername())) !null) {return R.error(用户已存在);}userService.insert(user);return R.ok();}/*** 修改*/RequestMapping(/update)public R update(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();} } 2、文件上传模块 package com.controller;import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.UUID;import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.ResourceUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.entity.ConfigEntity; import com.entity.EIException; import com.service.ConfigService; import com.utils.R;/*** 上传文件映射表*/ RestController RequestMapping(file) SuppressWarnings({unchecked,rawtypes}) public class FileController{Autowiredprivate ConfigService configService;/*** 上传文件*/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);FileUtils.copyFile(dest, new File(C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload/fileName));if(StringUtils.isNotBlank(type) type.equals(1)) {ConfigEntity configEntity configService.selectOne(new EntityWrapperConfigEntity().eq(name, faceFile));if(configEntitynull) {configEntity new ConfigEntity();configEntity.setName(faceFile);configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put(file, fileName);}/*** 下载文件*/IgnoreAuthRequestMapping(/download)public ResponseEntitybyte[] download(RequestParam String fileName) {try {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();}File file new File(upload.getAbsolutePath()/fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); headers.setContentDispositionFormData(attachment, fileName); return new ResponseEntitybyte[](FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntitybyte[](HttpStatus.INTERNAL_SERVER_ERROR);}} 3、代码封装 package com.utils;import java.util.HashMap; import java.util.Map;/*** 返回数据*/ public class R extends HashMapString, Object {private static final long serialVersionUID 1L;public R() {put(code, 0);}public static R error() {return error(500, 未知异常请联系管理员);}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r new R();r.put(code, code);r.put(msg, msg);return r;}public static R ok(String msg) {R r new R();r.put(msg, msg);return r;}public static R ok(MapString, Object map) {R r new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;} }

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

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

相关文章

北京西站在几环校友网站建设

前端工程化是使用软件工程的方法来单独解决前端的开发流程中模块化、组件化、规范化、自动化的问题,其主要目的为了提高效率和降低成本。 前端工程化实现技术栈 前端工程化实现的技术栈有很多,我们采用ES6nodejsnpmViteVUE3routerpiniaaxiosElement-plus组合来实现 ECMAScri…

自己做的网站视频播放不了中国上市网络公司排名

https://www.cnblogs.com/qiankun-site/p/5886673.html 1、此监听器主要用于解决java.beans.Introspector导致的内存泄漏的问题 2、此监听器应该配置在web.xml中与Spring相关监听器中的第一个位置(也要在ContextLoaderListener的前面)3、JDK中的java.beans.Introspector类的用途…

广州市公司网站建设足球比赛直播平台app

一、Mysql基本介绍 当谈论MySQL时,通常指的是一个流行的开源关系型数据库管理系统(RDBMS)。MySQL是由瑞典的开发者在1995年创建的,后来被Sun Microsystems收购,最终成为Oracle Corporation的一部分。以下是关于MySQL的…

建站成本深圳网络营销推广案例

apple mac 下使用机械键盘的办法,键盘映射工具软件,apple mac Mechanical keyboard 想在苹果电脑 mac 系统下使用 机械键盘,大部分机械键盘不是为mac设计的,所以需要用软件做一下键盘映射。 推荐使用这个:https://pqrs…

手机网站首页怎么做教育类网站 前置审批

#-*- coding: utf-8 -*-""" 思路 核心:每次落稳之后截图,根据截图算出棋子的坐标和下一个块顶面的中点坐标,根据两个点的距离乘以一个时间系数获得长按的时间识别棋子:靠棋子的颜色来识别位置,通过截图…

网页制作培训网站辽宁注册公司网站

当玩家或用户在启动某些游戏和应用程序时,可能会遭遇到一个系统错误提示:“由于找不到xinput1_3.dll,无法继续执行代码l”。这种情况通常指出系统中DirectX组件存在问题。以下我们将介绍几种常用的解决方法,并提供详细的操作步骤。 一.找不到…

合肥专业做淘宝网站建设wordpress 下拉菜单插件

Spring 是线程安全的,支持多线程并发调用。但在某种特殊情况下,使用 BeanFactory 的 getBean 方法,我成功拿到了未经初始化的 Bean(是BUG,亦或是出于某种原因考虑的特性?)。 一、获取到的 Bean 为什么未初始化? 通过 getBean 获取到未经过初始化的 Bean 需要满足如下…

福州网站建设招商娄底企业网站建设公司

索引的设计原则 索引覆盖是什么: 索引(在MySQL中也叫做“键(key)”) 是存储引擎用于快速找到记录的一种数据结构。这是索引的基本功能。 索引对于良好的性能非常关键。尤其是当表中的数据量越来越大时,索引…

在线免费视频网站推广平面广告设计用什么软件

学习目的: (1) 熟悉SPI接口和它的读写时序; (2) 复习Verilog仿真语句中的$readmemb命令和$display命令; (3) 掌握SPI接口写时序操作的硬件语言描述流程(本例仅…

python 做网站开发吗做网站如何选择数据源

出现原因: 此处的offset的值表示的是盒子模型经过计算后的实际偏移量,通常是margin及定位偏移量之和(flex布局导致的偏移也会计算在内)。在此处也无需消除。 解决办法: 父元素设置宽高。设置margin为负数&#xff0…

做租房信息网站淘宝怎么优化关键词排名

区别: 1,Resource(JSR-250标准注解,推荐使用它来代替Spring专有的Autowired注解) 2,Spring 不但支持自己定义的Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是Resourc…

广西建设厅考试网站博客网站开发报告文库

OpenCV7-copyTo截取ROI copyTo截取感兴趣区域 copyTo截取感兴趣区域 有时候,我们只对一幅图像中的部分区域感兴趣,而原图像又十分大,如果带着非感兴趣区域一次处理,就会对程序的内存造成负担,因此我们希望从原始图像中…

两学一做学习网站更多标签的适用场景

如果你的操作系统是 Windows,而你想要连接 Linux 服务器相互传送文件,那么你需要一个简称 SSH 的 Secure Shell 软件。实际上,SSH 是一个网络协议,它允许你通过网络连接到 Linux 和 Unix 服务器。SSH 使用公钥加密来认证远程的计算…

代理注册seo是什么职业

问题描述   JSON (JavaScript Object Notation) 是一种轻量级的数据交换格式,可以用来描述半结构化的数据。JSON 格式中的基本单元是值 (value),出于简化的目的本题只涉及 2 种类型的值:   * 字符串 (string):字符串是由双引号…

山西省建设执业资格注册中心网站软件制作公司排名

1.介绍和基础操作 Python中的元组(Tuple)是不可变有序序列,可以容纳任意数据类型(包括数字、字符串、布尔型、列表、字典等)的元素,通常用圆括号() 包裹。与列表(List)类似&#xff…

专业网站设计服务在线咨询义乌企业网站

FROM : http://blog.ityao.com/archives/581 如果想用Flash/Flex监听浏览器的关闭事件,可以通过JavaScript的window.onbeforeunload事件进行监听然后JS调用Flash中的函数。在swf所在页面的JavaScript中添加如下代码JS中代码:(这里设定swf文件…

破解网站后台账号密码上海做网站的公司多少钱

也许有些人是学C出身,对于Java几乎不了解。一时心血来潮想学学android开发,于是下载了Eclipse,安装了SDK,有模有样的学习起来。也许是懒惰了,对于java一直总是提不起精神。于是确定使用DreamweaverJquery mobilePhoneg…

比较好的公文写作网站wordpress菜单怎么添加次级菜单

函数的三种调用方式:1、函数作为表达式中的一项出现在表达式中,例“zmax(x,y)”;2、函数作为一个单独的语句,例“printf("%d",a)”;3、函数作为调用另一个函数时的实参,例“printf("%d"…

专门做pp他的网站WordPress十大免费CMS主题

矩阵键盘 矩阵键盘是一种常用于电子设备中的输入设备,其原理是利用行和列的交叉点来识别按键输入。矩阵键盘通常由多个按键排列成行和列的形式组成,通过按下某个按键可以在对应的行和列交叉点上产生电路连接。 在矩阵键盘中,每个按键都被安排…

网站建设需要学代码吗企业网站建设规划方案

#Dubbo# 文章内容 Dubbo服务导出基本原理分析Dubbo服务注册流程源码分析Dubbo服务暴露流程源码分析服务导出的入口方法为ServiceBean.export(),此方法会调用ServiceConfig.export()方法,进行真正的服务导出。 1. 服务导出大概原理 服务导出的入口方法为ServiceBean.export…