摘 要
随着我国经济迅速发展,人们对手机的需求越来越大,各种手机软件也都在被广泛应用,但是对于手机进行数据信息管理,对于手机的各种软件也是备受用户的喜爱,居住证申报系统被用户普遍使用,为方便用户能够可以随时进行居住证申报系统的数据信息管理,特开发了基于居住证申报系统的管理系统。
居住证申报系统的设计主要是对系统所要实现的功能进行详细考虑,确定所要实现的功能后进行界面的设计,在这中间还要考虑如何可以更好的将功能及页面进行很好的结合,方便用户可以很容易明了的找到自己所需要的信息,还有系统平台后期的可操作性,通过对信息内容的详细了解进行技术的开发。
居住证申报系统的开发利用现有的成熟技术参考,以源代码为模板,分析功能调整与居住证申报系统管理的实际需求相结合,讨论了基于居住证申报系统管理的使用。
关键词:居住证申报系统;JAVA
基于微信小程序的居住证申报系统+ssm后台管理系统042
演示视频:
基于微信小程序的居住证申报系统+ssm后台管理系统(源码+论文+PPT)
Abstract
With the rapid development of China's economy, people have more and more demands for mobile phones, and various mobile phone software are also widely used. However, for mobile phones, data information management is also popular with users. Residence permit declaration system is widely used by users, so that users can manage the data information of residence permit declaration system at any time, The management system based on residence permit declaration system is developed.
The design of residence permit declaration system mainly considers the functions to be realized in the system, and then designs the interface after determining the functions to be realized. In this process, how to better combine the functions and pages, so that users can easily find the information they need, and the operability of the system platform later. Through the analysis of the system, the user can easily find the information they need, and the operability of the system platform The detailed understanding of information content is used to develop technology.
The development of residence permit application system uses the existing mature technical reference, takes the source code as the template, analyzes the combination of function adjustment and the actual needs of residence permit declaration system management, and discusses the use of residence permit declaration system management.
Key words: residence permit declaration system; Java
文章来源:https://www.toymoban.com/news/detail-759831.html
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.QunzhongyonghuEntity;
import com.entity.view.QunzhongyonghuView;
import com.service.QunzhongyonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 群众用户
* 后端接口
* @author
* @email
* @date 2021-03-10 09:33:24
*/
@RestController
@RequestMapping("/qunzhongyonghu")
public class QunzhongyonghuController {
@Autowired
private QunzhongyonghuService qunzhongyonghuService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
QunzhongyonghuEntity user = qunzhongyonghuService.selectOne(new EntityWrapper<QunzhongyonghuEntity>().eq("yonghuzhanghao", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"qunzhongyonghu", "群众用户" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody QunzhongyonghuEntity qunzhongyonghu){
//ValidatorUtils.validateEntity(qunzhongyonghu);
QunzhongyonghuEntity user = qunzhongyonghuService.selectOne(new EntityWrapper<QunzhongyonghuEntity>().eq("yonghuzhanghao", qunzhongyonghu.getYonghuzhanghao()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
qunzhongyonghu.setId(uId);
qunzhongyonghuService.insert(qunzhongyonghu);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
QunzhongyonghuEntity user = qunzhongyonghuService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
QunzhongyonghuEntity user = qunzhongyonghuService.selectOne(new EntityWrapper<QunzhongyonghuEntity>().eq("yonghuzhanghao", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
qunzhongyonghuService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,QunzhongyonghuEntity qunzhongyonghu, HttpServletRequest request){
EntityWrapper<QunzhongyonghuEntity> ew = new EntityWrapper<QunzhongyonghuEntity>();
PageUtils page = qunzhongyonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qunzhongyonghu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,QunzhongyonghuEntity qunzhongyonghu, HttpServletRequest request){
EntityWrapper<QunzhongyonghuEntity> ew = new EntityWrapper<QunzhongyonghuEntity>();
PageUtils page = qunzhongyonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qunzhongyonghu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( QunzhongyonghuEntity qunzhongyonghu){
EntityWrapper<QunzhongyonghuEntity> ew = new EntityWrapper<QunzhongyonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( qunzhongyonghu, "qunzhongyonghu"));
return R.ok().put("data", qunzhongyonghuService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(QunzhongyonghuEntity qunzhongyonghu){
EntityWrapper< QunzhongyonghuEntity> ew = new EntityWrapper< QunzhongyonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( qunzhongyonghu, "qunzhongyonghu"));
QunzhongyonghuView qunzhongyonghuView = qunzhongyonghuService.selectView(ew);
return R.ok("查询群众用户成功").put("data", qunzhongyonghuView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
QunzhongyonghuEntity qunzhongyonghu = qunzhongyonghuService.selectById(id);
return R.ok().put("data", qunzhongyonghu);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
QunzhongyonghuEntity qunzhongyonghu = qunzhongyonghuService.selectById(id);
return R.ok().put("data", qunzhongyonghu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody QunzhongyonghuEntity qunzhongyonghu, HttpServletRequest request){
qunzhongyonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(qunzhongyonghu);
QunzhongyonghuEntity user = qunzhongyonghuService.selectOne(new EntityWrapper<QunzhongyonghuEntity>().eq("yonghuzhanghao", qunzhongyonghu.getYonghuzhanghao()));
if(user!=null) {
return R.error("用户已存在");
}
qunzhongyonghu.setId(new Date().getTime());
qunzhongyonghuService.insert(qunzhongyonghu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody QunzhongyonghuEntity qunzhongyonghu, HttpServletRequest request){
qunzhongyonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(qunzhongyonghu);
QunzhongyonghuEntity user = qunzhongyonghuService.selectOne(new EntityWrapper<QunzhongyonghuEntity>().eq("yonghuzhanghao", qunzhongyonghu.getYonghuzhanghao()));
if(user!=null) {
return R.error("用户已存在");
}
qunzhongyonghu.setId(new Date().getTime());
qunzhongyonghuService.insert(qunzhongyonghu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody QunzhongyonghuEntity qunzhongyonghu, HttpServletRequest request){
//ValidatorUtils.validateEntity(qunzhongyonghu);
qunzhongyonghuService.updateById(qunzhongyonghu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
qunzhongyonghuService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<QunzhongyonghuEntity> wrapper = new EntityWrapper<QunzhongyonghuEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = qunzhongyonghuService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
文章来源地址https://www.toymoban.com/news/detail-759831.html
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.LingzhengxinxiEntity;
import com.entity.view.LingzhengxinxiView;
import com.service.LingzhengxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 领证信息
* 后端接口
* @author
* @email
* @date 2021-03-10 09:33:24
*/
@RestController
@RequestMapping("/lingzhengxinxi")
public class LingzhengxinxiController {
@Autowired
private LingzhengxinxiService lingzhengxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,LingzhengxinxiEntity lingzhengxinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qunzhongyonghu")) {
lingzhengxinxi.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("jingfang")) {
lingzhengxinxi.setGonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<LingzhengxinxiEntity> ew = new EntityWrapper<LingzhengxinxiEntity>();
PageUtils page = lingzhengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lingzhengxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,LingzhengxinxiEntity lingzhengxinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qunzhongyonghu")) {
lingzhengxinxi.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("jingfang")) {
lingzhengxinxi.setGonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<LingzhengxinxiEntity> ew = new EntityWrapper<LingzhengxinxiEntity>();
PageUtils page = lingzhengxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lingzhengxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( LingzhengxinxiEntity lingzhengxinxi){
EntityWrapper<LingzhengxinxiEntity> ew = new EntityWrapper<LingzhengxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( lingzhengxinxi, "lingzhengxinxi"));
return R.ok().put("data", lingzhengxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(LingzhengxinxiEntity lingzhengxinxi){
EntityWrapper< LingzhengxinxiEntity> ew = new EntityWrapper< LingzhengxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( lingzhengxinxi, "lingzhengxinxi"));
LingzhengxinxiView lingzhengxinxiView = lingzhengxinxiService.selectView(ew);
return R.ok("查询领证信息成功").put("data", lingzhengxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
LingzhengxinxiEntity lingzhengxinxi = lingzhengxinxiService.selectById(id);
return R.ok().put("data", lingzhengxinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
LingzhengxinxiEntity lingzhengxinxi = lingzhengxinxiService.selectById(id);
return R.ok().put("data", lingzhengxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody LingzhengxinxiEntity lingzhengxinxi, HttpServletRequest request){
lingzhengxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(lingzhengxinxi);
lingzhengxinxiService.insert(lingzhengxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody LingzhengxinxiEntity lingzhengxinxi, HttpServletRequest request){
lingzhengxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(lingzhengxinxi);
lingzhengxinxi.setUserid((Long)request.getSession().getAttribute("userId"));
lingzhengxinxiService.insert(lingzhengxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody LingzhengxinxiEntity lingzhengxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(lingzhengxinxi);
lingzhengxinxiService.updateById(lingzhengxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
lingzhengxinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<LingzhengxinxiEntity> wrapper = new EntityWrapper<LingzhengxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qunzhongyonghu")) {
wrapper.eq("yonghuzhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("jingfang")) {
wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
int count = lingzhengxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
到了这里,关于基于微信小程序的居住证申报系统+ssm后台管理系统的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!