今天给大家开源一个基于SSM疫情期间的物业管理系统。
系统的功能非常的nice。
需要学习,拿去吧。欢迎点赞、评论。
目录
一,系统功能展示:
系统的功能框架图如下所示:
二,系统的界面展示:
三,系统的核心代码展示:
@RestController
@RequestMapping("/baogaoxinxi")
public class BaogaoxinxiController {
@Autowired
private BaogaoxinxiService baogaoxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BaogaoxinxiEntity baogaoxinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yezhu")) {
baogaoxinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<BaogaoxinxiEntity> ew = new EntityWrapper<BaogaoxinxiEntity>();
PageUtils page = baogaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baogaoxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BaogaoxinxiEntity baogaoxinxi, HttpServletRequest request){
EntityWrapper<BaogaoxinxiEntity> ew = new EntityWrapper<BaogaoxinxiEntity>();
PageUtils page = baogaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, baogaoxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( BaogaoxinxiEntity baogaoxinxi){
EntityWrapper<BaogaoxinxiEntity> ew = new EntityWrapper<BaogaoxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baogaoxinxi, "baogaoxinxi"));
return R.ok().put("data", baogaoxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(BaogaoxinxiEntity baogaoxinxi){
EntityWrapper< BaogaoxinxiEntity> ew = new EntityWrapper< BaogaoxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( baogaoxinxi, "baogaoxinxi"));
BaogaoxinxiView baogaoxinxiView = baogaoxinxiService.selectView(ew);
return R.ok("查询报告信息成功").put("data", baogaoxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
BaogaoxinxiEntity baogaoxinxi = baogaoxinxiService.selectById(id);
return R.ok().put("data", baogaoxinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
BaogaoxinxiEntity baogaoxinxi = baogaoxinxiService.selectById(id);
return R.ok().put("data", baogaoxinxi);
}
@RestController
@RequestMapping("/cheweixinxi")
public class CheweixinxiController {
@Autowired
private CheweixinxiService cheweixinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,CheweixinxiEntity cheweixinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yezhu")) {
cheweixinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
PageUtils page = cheweixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cheweixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,CheweixinxiEntity cheweixinxi, HttpServletRequest request){
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
PageUtils page = cheweixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cheweixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( CheweixinxiEntity cheweixinxi){
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( cheweixinxi, "cheweixinxi"));
return R.ok().put("data", cheweixinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(CheweixinxiEntity cheweixinxi){
EntityWrapper< CheweixinxiEntity> ew = new EntityWrapper< CheweixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( cheweixinxi, "cheweixinxi"));
CheweixinxiView cheweixinxiView = cheweixinxiService.selectView(ew);
return R.ok("查询车位信息成功").put("data", cheweixinxiView);
}
/**
* 通用接口
*/
@RestController
public class CommonController{
@Autowired
private CommonService commonService;
@Autowired
private ConfigService configService;
private static AipFace client = null;
private static String BAIDU_DITU_AK = null;
@RequestMapping("/location")
public R location(String lng,String lat) {
if(BAIDU_DITU_AK==null) {
BAIDU_DITU_AK = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "baidu_ditu_ak")).getValue();
if(BAIDU_DITU_AK==null) {
return R.error("请在配置管理中正确配置baidu_ditu_ak");
}
}
Map<String, String> map = BaiduUtil.getCityByLonLat(BAIDU_DITU_AK, lng, lat);
return R.ok().put("data", map);
}
/**
* 人脸比对
*
* @param face1 人脸1
* @param face2 人脸2
* @return
*/
@RequestMapping("/matchFace")
public R matchFace(String face1, String face2,HttpServletRequest request) {
if(client==null) {
/*String AppID = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "AppID")).getValue();*/
String APIKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "APIKey")).getValue();
String SecretKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "SecretKey")).getValue();
String token = BaiduUtil.getAuth(APIKey, SecretKey);
if(token==null) {
return R.error("请在配置管理中正确配置APIKey和SecretKey");
}
client = new AipFace(null, APIKey, SecretKey);
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(60000);
}
JSONObject res = null;
try {
File file1 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face1);
File file2 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face2);
String img1 = Base64Util.encode(FileUtil.FileToByte(file1));
String img2 = Base64Util.encode(FileUtil.FileToByte(file2));
MatchRequest req1 = new MatchRequest(img1, "BASE64");
MatchRequest req2 = new MatchRequest(img2, "BASE64");
ArrayList<MatchRequest> requests = new ArrayList<MatchRequest>();
requests.add(req1);
requests.add(req2);
res = client.match(requests);
System.out.println(res.get("result"));
} catch (FileNotFoundException e) {
e.printStackTrace();
return R.error("文件不存在");
} catch (IOException e) {
e.printStackTrace();
}
return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString()));
}
四,系统的源码获取:
如果也想学习本系统,已经开源了,下面领取。回复:ssm物业