当前位置: 首页 > news >正文

模板网站制作公司五种关键词优化工具

模板网站制作公司,五种关键词优化工具,东莞市建设安监局网站首页,可拖拽html网页编辑器随着信息技术和网络技术的飞速发展#xff0c;人类已进入全新信息化时代#xff0c;传统管理技术已无法高效#xff0c;便捷地管理信息。为了迎合时代需求#xff0c;优化管理效率#xff0c;各种各样的管理系统应运而生#xff0c;各行各业相继进入信息管理时代#xf… 随着信息技术和网络技术的飞速发展人类已进入全新信息化时代传统管理技术已无法高效便捷地管理信息。为了迎合时代需求优化管理效率各种各样的管理系统应运而生各行各业相继进入信息管理时代4S店车辆系统就是信息时代变革中的产物之一。 任何系统都要遵循系统设计的基本流程本系统也不例外同样需要经过市场调研需求分析概要设计详细设计编码测试这些步骤基于java语言设计并实现了4S店车辆系统。该系统基于B/S即所谓浏览器/服务器模式应用java技术选择MySQL作为后台数据库。系统主要包括首页、个人中心、销售员管理、维修员管理、客户管理、供应商信息管理、保险公司管理、车辆信息管理、物资信息管理、车辆销售管理、车辆维修管理、营业统计管理、销售统计管理等功能模块。 本文首先介绍了4S店车辆管理的技术发展背景与发展现状然后遵循软件常规开发流程首先针对系统选取适用的语言和开发平台根据需求分析制定模块并设计数据库结构再根据系统总体功能模块的设计绘制系统的功能模块图流程图以及E-R图。然后设计框架并根据设计的框架编写代码以实现系统的各个功能模块。最后对初步完成的系统进行测试主要是功能测试、单元测试和性能测试。测试结果表明该系统能够实现所需的功能运行状况尚可并无明显缺点。 关键词4S店车辆管理javaMySQL数据库 基于springboot的4S店车辆管理系统源码和论文393 演示视频 基于springboot的4S店车辆管理系统源码和论文 Abstract With the rapid development of information technology and network technology, human beings have entered a new information age, traditional management technology has been unable to efficiently and conveniently manage information. In order to meet the needs of The Times and optimize management efficiency, a variety of management systems have emerged. All walks of life have entered the information management era. The vehicle system of 4S shop is one of the products in the information era. Any system must follow the basic process of system design, this system is no exception, also need to go through market research, demand analysis, outline design, detailed design, coding, testing these steps, based on Java language design and implementation of 4S shop vehicle system. The system is based on B/S browser/server mode, the application of Java technology, MySQL as the background database. The system mainly includes home page, personal center, sales management, maintenance staff management, customer management, supplier information management, insurance company management, vehicle information management, material information management, vehicle sales management, vehicle maintenance management, business statistics management, sales statistics management and other functional modules. This paper first introduces the 4 s store traffic management technology development background and current situation of the development, and then follow the routine software development process, first of all, in view of the system and the selection of suitable language development platform, according to the requirement analysis module and database structure design, and then based on the systems overall function module design rendering system function module chart, flow diagram and e-r diagram. Then, design the framework and write code according to the designed framework to achieve each functional module of the system. Finally, the preliminary completed system is tested, mainly functional test, unit test and performance test. The test results show that the system can achieve the required functions, and the running condition is fair and there is no obvious defect. Key words: 4S shop vehicle management; Java; The MySQL database package com.controller;import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.*; import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.*; import com.entity.view.*; import com.service.*; import com.utils.PageUtils; import com.utils.R; import com.alibaba.fastjson.*;/*** 用户* 后端接口* author* email */ RestController Controller RequestMapping(/yonghu) public class YonghuController {private static final Logger logger LoggerFactory.getLogger(YonghuController.class);private static final String TABLE_NAME yonghu;Autowiredprivate YonghuService yonghuService;Autowiredprivate TokenService tokenService;Autowiredprivate DictionaryService dictionaryService;//字典Autowiredprivate ForumService forumService;//交流论坛Autowiredprivate GonggaoService gonggaoService;//公告资讯Autowiredprivate HanfuService hanfuService;//汉服信息Autowiredprivate HanfuCollectionService hanfuCollectionService;//汉服收藏Autowiredprivate HanfuCommentbackService hanfuCommentbackService;//汉服评价Autowiredprivate HanfuOrderService hanfuOrderService;//汉服租赁Autowiredprivate UsersService usersService;//管理员/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(page方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永不会进入);else if(用户.equals(role))params.put(yonghuId,request.getSession().getAttribute(userId));CommonUtil.checkMap(params);PageUtils page yonghuService.queryPage(params);//字典表数据转换ListYonghuView list (ListYonghuView)page.getList();for(YonghuView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put(data, page);}/*** 后端详情*/RequestMapping(/info/{id})public R info(PathVariable(id) Long id, HttpServletRequest request){logger.debug(info方法:,,Controller:{},,id:{},this.getClass().getName(),id);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug(save方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永远不会进入);WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber());logger.info(sql语句:queryWrapper.getSqlSegment());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntitynull){yonghu.setCreateTime(new Date());yonghu.setPassword(123456);yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,账户或者用户手机号或者用户身份证号已经被使用);}}/*** 后端修改*/RequestMapping(/update)public R update(RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug(update方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());YonghuEntity oldYonghuEntity yonghuService.selectById(yonghu.getId());//查询原先数据String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入);if(.equals(yonghu.getYonghuPhoto()) || null.equals(yonghu.getYonghuPhoto())){yonghu.setYonghuPhoto(null);}yonghuService.updateById(yonghu);//根据id更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Integer[] ids, HttpServletRequest request){logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString());ListYonghuEntity oldYonghuList yonghuService.selectBatchIds(Arrays.asList(ids));//要删除的数据yonghuService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/RequestMapping(/batchInsert)public R save( String fileName, HttpServletRequest request){logger.debug(batchInsert方法:,,Controller:{},,fileName:{},this.getClass().getName(),fileName);Integer yonghuId Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)));SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);//.eq(time, new SimpleDateFormat(yyyy-MM-dd).format(new Date()))try {ListYonghuEntity yonghuList new ArrayList();//上传的东西MapString, ListString seachFields new HashMap();//要查询的字段Date date new Date();int lastIndexOf fileName.lastIndexOf(.);if(lastIndexOf -1){return R.error(511,该文件没有后缀);}else{String suffix fileName.substring(lastIndexOf);if(!.xls.equals(suffix)){return R.error(511,只支持后缀为xls的excel文件);}else{URL resource this.getClass().getClassLoader().getResource(static/upload/ fileName);//获取文件路径File file new File(resource.getFile());if(!file.exists()){return R.error(511,找不到上传文件请联系管理员);}else{ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行因为第一行是提示for(ListString data:dataList){//循环YonghuEntity yonghuEntity new YonghuEntity(); // yonghuEntity.setUsername(data.get(0)); //账户 要改的 // yonghuEntity.setPassword(123456);//密码 // yonghuEntity.setYonghuUuidNumber(data.get(0)); //用户编号 要改的 // yonghuEntity.setYonghuName(data.get(0)); //用户姓名 要改的 // yonghuEntity.setYonghuPhone(data.get(0)); //用户手机号 要改的 // yonghuEntity.setYonghuIdNumber(data.get(0)); //用户身份证号 要改的 // yonghuEntity.setYonghuPhoto();//详情和图片 // yonghuEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的 // yonghuEntity.setNewMoney(data.get(0)); //余额 要改的 // yonghuEntity.setYonghuEmail(data.get(0)); //用户邮箱 要改的 // yonghuEntity.setCreateTime(date);//时间yonghuList.add(yonghuEntity);//把要查询是否重复的字段放入map中//账户if(seachFields.containsKey(username)){ListString username seachFields.get(username);username.add(data.get(0));//要改的}else{ListString username new ArrayList();username.add(data.get(0));//要改的seachFields.put(username,username);}//用户编号if(seachFields.containsKey(yonghuUuidNumber)){ListString yonghuUuidNumber seachFields.get(yonghuUuidNumber);yonghuUuidNumber.add(data.get(0));//要改的}else{ListString yonghuUuidNumber new ArrayList();yonghuUuidNumber.add(data.get(0));//要改的seachFields.put(yonghuUuidNumber,yonghuUuidNumber);}//用户手机号if(seachFields.containsKey(yonghuPhone)){ListString yonghuPhone seachFields.get(yonghuPhone);yonghuPhone.add(data.get(0));//要改的}else{ListString yonghuPhone new ArrayList();yonghuPhone.add(data.get(0));//要改的seachFields.put(yonghuPhone,yonghuPhone);}//用户身份证号if(seachFields.containsKey(yonghuIdNumber)){ListString yonghuIdNumber seachFields.get(yonghuIdNumber);yonghuIdNumber.add(data.get(0));//要改的}else{ListString yonghuIdNumber new ArrayList();yonghuIdNumber.add(data.get(0));//要改的seachFields.put(yonghuIdNumber,yonghuIdNumber);}}//查询是否重复//账户ListYonghuEntity yonghuEntities_username yonghuService.selectList(new EntityWrapperYonghuEntity().in(username, seachFields.get(username)));if(yonghuEntities_username.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_username){repeatFields.add(s.getUsername());}return R.error(511,数据库的该表中的 [账户] 字段已经存在 存在数据为:repeatFields.toString());}//用户编号ListYonghuEntity yonghuEntities_yonghuUuidNumber yonghuService.selectList(new EntityWrapperYonghuEntity().in(yonghu_uuid_number, seachFields.get(yonghuUuidNumber)));if(yonghuEntities_yonghuUuidNumber.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_yonghuUuidNumber){repeatFields.add(s.getYonghuUuidNumber());}return R.error(511,数据库的该表中的 [用户编号] 字段已经存在 存在数据为:repeatFields.toString());}//用户手机号ListYonghuEntity yonghuEntities_yonghuPhone yonghuService.selectList(new EntityWrapperYonghuEntity().in(yonghu_phone, seachFields.get(yonghuPhone)));if(yonghuEntities_yonghuPhone.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_yonghuPhone){repeatFields.add(s.getYonghuPhone());}return R.error(511,数据库的该表中的 [用户手机号] 字段已经存在 存在数据为:repeatFields.toString());}//用户身份证号ListYonghuEntity yonghuEntities_yonghuIdNumber yonghuService.selectList(new EntityWrapperYonghuEntity().in(yonghu_id_number, seachFields.get(yonghuIdNumber)));if(yonghuEntities_yonghuIdNumber.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_yonghuIdNumber){repeatFields.add(s.getYonghuIdNumber());}return R.error(511,数据库的该表中的 [用户身份证号] 字段已经存在 存在数据为:repeatFields.toString());}yonghuService.insertBatch(yonghuList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,批量插入数据异常请联系管理员);}}/*** 登录*/IgnoreAuthRequestMapping(value /login)public R login(String username, String password, String captcha, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectOne(new EntityWrapperYonghuEntity().eq(username, username));if(yonghunull || !yonghu.getPassword().equals(password))return R.error(账号或密码不正确);String token tokenService.generateToken(yonghu.getId(),username, yonghu, 用户);R r R.ok();r.put(token, token);r.put(role,用户);r.put(username,yonghu.getYonghuName());r.put(tableName,yonghu);r.put(userId,yonghu.getId());return r;}/*** 注册*/IgnoreAuthPostMapping(value /register)public R register(RequestBody YonghuEntity yonghu, HttpServletRequest request) { // ValidatorUtils.validateEntity(user);WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntity ! null)return R.error(账户或者用户手机号或者用户身份证号已经被使用);yonghu.setYonghuUuidNumber(String.valueOf(new Date().getTime()));yonghu.setNewMoney(0.0);yonghu.setCreateTime(new Date());yonghuService.insert(yonghu);return R.ok();}/*** 重置密码*/GetMapping(value /resetPassword)public R resetPassword(Integer id, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectById(id);yonghu.setPassword(123456);yonghuService.updateById(yonghu);return R.ok();}/*** 修改密码*/GetMapping(value /updatePassword)public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectById((Integer)request.getSession().getAttribute(userId));if(newPassword null){return R.error(新密码不能为空) ;}if(!oldPassword.equals(yonghu.getPassword())){return R.error(原密码输入错误);}if(newPassword.equals(yonghu.getPassword())){return R.error(新密码不能和原密码一致) ;}yonghu.setPassword(newPassword);yonghuService.updateById(yonghu);return R.ok();}/*** 忘记密码*/IgnoreAuthRequestMapping(value /resetPass)public R resetPass(String username, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectOne(new EntityWrapperYonghuEntity().eq(username, username));if(yonghu!null){yonghu.setPassword(123456);yonghuService.updateById(yonghu);return R.ok();}else{return R.error(账号不存在);}}/*** 获取用户的session用户信息*/RequestMapping(/session)public R getCurrYonghu(HttpServletRequest request){Integer id (Integer)request.getSession().getAttribute(userId);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 退出*/GetMapping(value logout)public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok(退出成功);}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page yonghuService.queryPage(params);//字典表数据转换ListYonghuView list (ListYonghuView)page.getList();for(YonghuView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put(data, page);}/*** 前端详情*/RequestMapping(/detail/{id})public R detail(PathVariable(id) Integer id, HttpServletRequest request){logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug(add方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber()) // .notIn(yonghu_types, new Integer[]{102});logger.info(sql语句:queryWrapper.getSqlSegment());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntitynull){yonghu.setCreateTime(new Date());yonghu.setPassword(123456);yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,账户或者用户手机号或者用户身份证号已经被使用);}}} package com.controller;import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.*; import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.*; import com.entity.view.*; import com.service.*; import com.utils.PageUtils; import com.utils.R; import com.alibaba.fastjson.*;/*** 客服聊天* 后端接口* author* email */ RestController Controller RequestMapping(/chat) public class ChatController {private static final Logger logger LoggerFactory.getLogger(ChatController.class);private static final String TABLE_NAME chat;Autowiredprivate ChatService chatService;Autowiredprivate TokenService tokenService;Autowiredprivate DictionaryService dictionaryService;//字典Autowiredprivate ForumService forumService;//论坛Autowiredprivate NewsService newsService;//扶贫公告Autowiredprivate RenwuService renwuService;//任务信息Autowiredprivate RenwuYuyueService renwuYuyueService;//任务报名Autowiredprivate XinwenService xinwenService;//新闻信息Autowiredprivate XinwenCollectionService xinwenCollectionService;//新闻收藏Autowiredprivate XinwenLiuyanService xinwenLiuyanService;//新闻留言Autowiredprivate YonghuService yonghuService;//用户Autowiredprivate UsersService usersService;//管理员/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(page方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永不会进入);else if(用户.equals(role))params.put(yonghuId,request.getSession().getAttribute(userId));CommonUtil.checkMap(params);PageUtils page chatService.queryPage(params);//字典表数据转换ListChatView list (ListChatView)page.getList();for(ChatView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put(data, page);}/*** 后端详情*/RequestMapping(/info/{id})public R info(PathVariable(id) Long id, HttpServletRequest request){logger.debug(info方法:,,Controller:{},,id:{},this.getClass().getName(),id);ChatEntity chat chatService.selectById(id);if(chat !null){//entity转viewChatView view new ChatView();BeanUtils.copyProperties( chat , view );//把实体数据重构到view中//级联表 用户//级联表YonghuEntity yonghu yonghuService.selectById(chat.getYonghuId());if(yonghu ! null){BeanUtils.copyProperties( yonghu , view ,new String[]{ id, createTime, insertTime, updateTime, yonghuId});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody ChatEntity chat, HttpServletRequest request){logger.debug(save方法:,,Controller:{},,chat:{},this.getClass().getName(),chat.toString());String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永远不会进入);else if(用户.equals(role))chat.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId))));WrapperChatEntity queryWrapper new EntityWrapperChatEntity().eq(yonghu_id, chat.getYonghuId()).eq(chat_issue, chat.getChatIssue()).eq(chat_reply, chat.getChatReply()).eq(zhuangtai_types, chat.getZhuangtaiTypes()).eq(chat_types, chat.getChatTypes());logger.info(sql语句:queryWrapper.getSqlSegment());ChatEntity chatEntity chatService.selectOne(queryWrapper);if(chatEntitynull){chat.setInsertTime(new Date());chatService.insert(chat);return R.ok();}else {return R.error(511,表中有相同数据);}}/*** 后端修改*/RequestMapping(/update)public R update(RequestBody ChatEntity chat, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug(update方法:,,Controller:{},,chat:{},this.getClass().getName(),chat.toString());ChatEntity oldChatEntity chatService.selectById(chat.getId());//查询原先数据String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入); // else if(用户.equals(role)) // chat.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId))));chatService.updateById(chat);//根据id更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Integer[] ids, HttpServletRequest request){logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString());ListChatEntity oldChatList chatService.selectBatchIds(Arrays.asList(ids));//要删除的数据chatService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/RequestMapping(/batchInsert)public R save( String fileName, HttpServletRequest request){logger.debug(batchInsert方法:,,Controller:{},,fileName:{},this.getClass().getName(),fileName);Integer yonghuId Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)));SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);//.eq(time, new SimpleDateFormat(yyyy-MM-dd).format(new Date()))try {ListChatEntity chatList new ArrayList();//上传的东西MapString, ListString seachFields new HashMap();//要查询的字段Date date new Date();int lastIndexOf fileName.lastIndexOf(.);if(lastIndexOf -1){return R.error(511,该文件没有后缀);}else{String suffix fileName.substring(lastIndexOf);if(!.xls.equals(suffix)){return R.error(511,只支持后缀为xls的excel文件);}else{URL resource this.getClass().getClassLoader().getResource(static/upload/ fileName);//获取文件路径File file new File(resource.getFile());if(!file.exists()){return R.error(511,找不到上传文件请联系管理员);}else{ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行因为第一行是提示for(ListString data:dataList){//循环ChatEntity chatEntity new ChatEntity(); // chatEntity.setYonghuId(Integer.valueOf(data.get(0))); //提问用户 要改的 // chatEntity.setChatIssue(data.get(0)); //问题 要改的 // chatEntity.setIssueTime(sdf.parse(data.get(0))); //问题时间 要改的 // chatEntity.setChatReply(data.get(0)); //回复 要改的 // chatEntity.setReplyTime(sdf.parse(data.get(0))); //回复时间 要改的 // chatEntity.setZhuangtaiTypes(Integer.valueOf(data.get(0))); //状态 要改的 // chatEntity.setChatTypes(Integer.valueOf(data.get(0))); //数据类型 要改的 // chatEntity.setInsertTime(date);//时间chatList.add(chatEntity);//把要查询是否重复的字段放入map中}//查询是否重复chatService.insertBatch(chatList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,批量插入数据异常请联系管理员);}}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page chatService.queryPage(params);//字典表数据转换ListChatView list (ListChatView)page.getList();for(ChatView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put(data, page);}/*** 前端详情*/RequestMapping(/detail/{id})public R detail(PathVariable(id) Long id, HttpServletRequest request){logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id);ChatEntity chat chatService.selectById(id);if(chat !null){//entity转viewChatView view new ChatView();BeanUtils.copyProperties( chat , view );//把实体数据重构到view中//级联表YonghuEntity yonghu yonghuService.selectById(chat.getYonghuId());if(yonghu ! null){BeanUtils.copyProperties( yonghu , view ,new String[]{ id, createDate});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody ChatEntity chat, HttpServletRequest request){logger.debug(add方法:,,Controller:{},,chat:{},this.getClass().getName(),chat.toString());WrapperChatEntity queryWrapper new EntityWrapperChatEntity().eq(yonghu_id, chat.getYonghuId()).eq(chat_issue, chat.getChatIssue()).eq(chat_reply, chat.getChatReply()).eq(zhuangtai_types, chat.getZhuangtaiTypes()).eq(chat_types, chat.getChatTypes()) // .notIn(chat_types, new Integer[]{102});logger.info(sql语句:queryWrapper.getSqlSegment());ChatEntity chatEntity chatService.selectOne(queryWrapper);if(chatEntitynull){chat.setInsertTime(new Date());chatService.insert(chat);return R.ok();}else {return R.error(511,表中有相同数据);}}}
http://www.zqtcl.cn/news/312489/

相关文章:

  • 登录建设官方网站品牌营销专家
  • 天津模板建站哪家好wordpress标题换行显示不全
  • 杭州房地产网站建设网站建设开发公司推荐指数
  • 建设部网站上怎样查询企业业绩做淘宝联盟网站要多少钱
  • 宣武上海网站建设网站导购话术
  • 天津北京网站建设公司大网站建设公司
  • 网站需要在哪些方面备案百度云建网站
  • 西安手机网站定制网站建设西安网站注册
  • 怎么做秒赞网站企业自己建设的营销网络
  • 一般网站建设需求有哪些wordpress脚注更改
  • 海报设计在线生成免费网站排名优化方案
  • 网站开发综合设计报告怎么制作浏览器网页
  • 做网站打广告青岛网站营销推广
  • 网站建设中首页模板本科 网站建设的基础教程
  • 推广网站优化seo教程上排名抖音营销
  • 创业园区网站建设wordpress对接公众号源码
  • 怎么设计公司的网站长沙seo结算
  • 参加网站建设项目人员保障体系镇江网站建设门户报价
  • 漯河网站优化景区网站建设方案
  • 辽宁智能网站建设价位wordpress 公司主题
  • zencart 网站入侵冲电气软件 网站建设
  • 在网上做黑彩网站会怎样wordpress自定义代码在哪里设置
  • 福州营销网站建设老品牌网站开通
  • 电子商务网站体系结构有哪些?网站开发规划书怎么写
  • 建设一个网站要多少钱建设银行信用卡卡网站首页
  • 百度推广效果怎样seo网上培训课程
  • 广州品牌网站建设 优美wordpress 跳转页面
  • 成都专业的网站建设制作公司哪家好m3u8视频可以永久保存吗
  • 上海做兼职的网站如何在凡科建设网站
  • 沙朗镇做网站公司企业管理咨询师是干什么的