package com.biye.hxpj.controller;
import com.alibaba.fastjson.JSONObject;
import com.biye.hxpj.mapper.HoneycombEmApartmentroomMapper;
import com.biye.hxpj.model.*;
import com.biye.hxpj.request.PageData;
import com.biye.hxpj.response.ResponseResult;
import com.biye.hxpj.service.*;
import com.github.pagehelper.PageInfo;
import com.sun.org.apache.bcel.internal.generic.RET;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @program: hxpj
* @description: 核心数据模块
* @author: LiLei
* @create: 2019-04-14 21:35
**/
@RequestMapping("/honeycomb")
@RestController
public class HoneycombController {
@Autowired
private HoneycombFirmsService honeycombFirmsService;
/**
* Honeycomb1逻辑控制 企业列表
* */
@PostMapping("/getFirmsList")
public ResponseResult getFirmList(@RequestBody PageData pageData){
try{
if (pageData==null){
return ResponseResult.buildError(4003,"获取frimlist入参错误!");
}
Integer page=pageData.getPageNum();
Integer size=pageData.getPageSize();
String firmname=pageData.getFirm();
JSONObject jsonObject=new JSONObject();
jsonObject.put("content",honeycombFirmsService.findFirmList(page,size,firmname));
return ResponseResult.buildSuccess(jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"获取公司表异常!");
}
}
@PostMapping("/createFirm")
public ResponseResult addFirm(@RequestBody HoneycombFirms honeycombFirms){
try{
JSONObject jsonObject=new JSONObject();
if(honeycombFirms==null){
return ResponseResult.buildError(4003,"入参为空!");
}
String name=honeycombFirms.getFirm();
HoneycombFirms honeycombFirms1=honeycombFirmsService.findByName(name);
if (honeycombFirms1==null){
honeycombFirmsService.addFirm(honeycombFirms);
return ResponseResult.buildSuccess("成功创建该公司",jsonObject);
}else {
return ResponseResult.buildError(4003,"该公司已存在!");
}
}catch (Exception e){
return ResponseResult.buildError(4003,"添加公司异常!");
}
}
@PostMapping("/updateFirm")
public ResponseResult updateFirm(@RequestBody HoneycombFirms honeycombFirms){
try{
if (honeycombFirms==null){
return ResponseResult.buildError(4003,"入参为空!");
}
honeycombFirmsService.updateFirm(honeycombFirms);
JSONObject jsonObject=new JSONObject();
return ResponseResult.buildSuccess("更新成功!",jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"更新公司后台异常!");
}
}
@PostMapping("/deleteFirm")
public ResponseResult deleteFirm(@RequestBody HoneycombFirms honeycombFirms){
try{
if (honeycombFirms==null){
return ResponseResult.buildError(4003,"入参为空!");
}
honeycombFirmsService.deleteFirm(honeycombFirms.getId());
JSONObject jsonObject=new JSONObject();
return ResponseResult.buildSuccess("成功删除",jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"删除公司后台异常!");
}
}
/**
* Honeycomb2逻辑控制 企业用房分配
* */
@Autowired
private HoneycombFirmApartmentService honeycombFirmApartmentService;
/**
* @Param: PageData封装所有分页list请求 pageNum pageSize
* */
@PostMapping("/getFirmApartmentList")
public ResponseResult getFirmApartmentList(@RequestBody PageData pageData){
try{
if (pageData==null){
return ResponseResult.buildError(4003,"获取FirmApartmentList入参错误!");
}
Integer page=pageData.getPageNum();
Integer size=pageData.getPageSize();
String firm=pageData.getFirm();
Long apartmentId=pageData.getApartmentId();
JSONObject jsonObject=new JSONObject();
jsonObject.put("content",honeycombFirmApartmentService.findFirmApartmentroomList(page,size,firm,apartmentId));
return ResponseResult.buildSuccess(jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"获取FirmApartmentList异常!");
}
}
@PostMapping("/addFirmApartment")
public ResponseResult addFirmApartment(@RequestBody FirmApartmentroom firmApartmentroom){
try{
if(firmApartmentroom==null){
return ResponseResult.buildError(4003,"入参为空!");
}
if(firmApartmentroom.getFirm()==null){
return ResponseResult.buildError(4003,"该公司不存在,请先添加该公司");
}
Long apartmentId=firmApartmentroom.getApartmentId();
Long roomId=firmApartmentroom.getRoomId();
if (honeycombFirmApartmentService.isHaveFrim(apartmentId,roomId)){
return ResponseResult.buildError(4003,"该房间已被占用");
}
honeycombFirmApartmentService.addFirmApartment(firmApartmentroom);
JSONObject jsonObject=new JSONObject();
return ResponseResult.buildSuccess("成功添加!",jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"添加FirmApartment异常");
}
}
@GetMapping("/getApartmentIdList")
public ResponseResult getApartmentIdList(){
try{
JSONObject jsonObject=new JSONObject();
jsonObject.put("ApartmentIdList",honeycombFirmApartmentService.findApartment());
return ResponseResult.buildSuccess(jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"获取ApartmentIdList异常!");
}
}
@GetMapping("/getAllFrimList")
public ResponseResult getAllFrimList(){
try{
JSONObject jsonObject=new JSONObject();
jsonObject.put("allFrimList",honeycombFirmsService.findAllFirm());
return ResponseResult.buildSuccess(jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"获取getAllFrimList异常");
}
}
@PostMapping("/updateFirmApart")
public ResponseResult updateFirmApart(@RequestBody FirmApartmentroom firmApartmentroom){
try{
if(firmApartmentroom==null){
return ResponseResult.buildError(4003,"入参为空!");
}
if(firmApartmentroom.getFirm()==null||firmApartmentroom.getFirm().equals("")){
return ResponseResult.buildError(4003,"该公司不存在,请先添加该公司");
}
honeycombFirmApartmentService.updateById(firmApartmentroom);
JSONObject jsonObject=new JSONObject();
return ResponseResult.buildSuccess("更新数据成功!",jsonObject);
}catch (Exception e){
return ResponseResult.buildError(4003,"更新updateFirmApart异常!");
}
}
@PostMapping("deleteFirmApart")
public ResponseResult deleteFirmApart(@RequestBody FirmApartmentroom firmApartmentroom){
try{
if(firmApartmentroom.getId()==null){
return ResponseResult.buildError(4003,"删除失败" );
}
int Aass=honeycombFirmApartmentService.deleteById(firmApartmentroom.getId());
JSONObject jsonObject=new JSONObject();
jsonObject.put("dele",Aass);
return ResponseResult.buildSuccess("成功删除数据!",jsonObject);
}
没有合适的资源?快使用搜索试试~ 我知道了~
基于SpringBoot的智慧园区后台管理系统+源代码+文档说明
共280个文件
java:137个
xml:134个
iml:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 144 浏览量
2023-11-28
16:15:36
上传
评论
收藏 174KB ZIP 举报
温馨提示
- ## 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。
资源推荐
资源详情
资源评论
收起资源包目录
基于SpringBoot的智慧园区后台管理系统+源代码+文档说明 (280个子文件)
hxpj-boot.iml 10KB
hxpj-core.iml 6KB
hxpj-dao.iml 5KB
hxpj-common.iml 2KB
hxpj.iml 830B
HoneycombController.java 35KB
HxscreenController.java 31KB
ComputeHxpjController.java 18KB
TimeMonthlyServiceImpl.java 13KB
TimeDailyServiceImpl.java 12KB
ComputeDailyServiceImpl.java 9KB
EchartServiceImpl.java 8KB
ComputeFirmServiceImpl.java 7KB
sysUserController.java 7KB
HxscreenFirstServiceImpl.java 6KB
HoneycombRecordServiceImpl.java 6KB
BigScreenController.java 5KB
HxscreenSecondServiceImpl.java 5KB
HxscreenThirdServiceImpl.java 4KB
SysUserServiceImpl.java 4KB
HoneycombMeterServiceImpl.java 4KB
HoneycombEWmApartServiceImpl.java 4KB
HoneycombEventServiceImpl.java 3KB
EchartController.java 3KB
HoneycombFirmApartmentServiceImpl.java 3KB
AuthenticationInterceptor.java 3KB
TimeTask.java 3KB
ResponseResult.java 2KB
HoneycombFirmsServiceImpl.java 2KB
test.java 2KB
HoneycombRoomerServiceImpl.java 2KB
ComputeFirmService.java 2KB
CurrentUserMethodArgumentResolver.java 2KB
ComputeDailyService.java 1KB
BigDataScreenServiceImpl.java 1KB
WebMvcConfig.java 1KB
HxscreenFirstService.java 1KB
HxscreenThirdService.java 1KB
HxscreenSecondService.java 1KB
HoneycombEWmApartService.java 1KB
HoneycombMeterService.java 1KB
BasicException.java 1KB
HoneycombEmApartmentroomMapper.java 795B
HoneycombRecordService.java 780B
HoneycombWmApartmentroomMapper.java 737B
HxpjBootApplication.java 721B
HoneycombFirmApartmentroomMapper.java 706B
FirmApartmentroomMapper.java 705B
HoneycombElectricMeterMapper.java 624B
HoneycombFirmApartmentService.java 620B
BusinessException.java 601B
HoneycombWaterMeterMapper.java 600B
SysUserService.java 568B
HoneycombFirmsMapper.java 554B
ComputeWmMonthlydevicerecordMapper.java 526B
ComputeEmMonthlydevicerecordMapper.java 524B
HoneycombFirmsService.java 522B
ComputeWmMonthlyfirmrecordMapper.java 516B
ComputeEmMonthlyfirmrecordMapper.java 512B
ComputeWmDailydevicerecordMapper.java 510B
ComputeEmDailydevicerecordMapper.java 508B
HoneycombRoomerService.java 507B
ComputeWmDailyfirmrecordMapper.java 496B
ComputeEmDailyfirmrecordMapper.java 495B
UserMapper.java 483B
CurrentUser.java 477B
HoneycombChargingPileMapper.java 469B
HoneycombPersonApartmentroomMapper.java 464B
HoneycombEventService.java 441B
HxscreenWaterMonthlyuseMapper.java 434B
HxscreenScreen12Mapper.java 431B
EchartService.java 429B
HoneycombCprecordMapper.java 425B
HxscreenScreen22Mapper.java 422B
HxscreenScreen21Mapper.java 422B
HxscreenScreen24YesterMapper.java 421B
HxscreenScreen24TodayMapper.java 416B
HxscreenWaterDailyuseMapper.java 416B
HoneycombEventrecordMapper.java 410B
HoneycombEventrecord.java 399B
HxscreenScreenMapMapper.java 398B
User.java 395B
HoneycombWmrecordMapper.java 392B
HoneycombEmrecordMapper.java 392B
HxscreenScreen23Mapper.java 387B
HxscreenCameraMapper.java 386B
HxscreenScreen11Mapper.java 386B
PageData.java 382B
HxscreenWindow2Mapper.java 380B
HxscreenWindow3Mapper.java 380B
HxscreenWindow4Mapper.java 380B
HxscreenWindow1Mapper.java 380B
BigDataScreenService.java 373B
LoginRequired.java 371B
TotalEmDailyMapper.java 364B
TotalWmDailyMapper.java 364B
TotalEmHourMapper.java 357B
TotalWmHourMapper.java 356B
HxscreenScreenMap.java 343B
ComputeWmMonthlydevicerecord.java 328B
共 280 条
- 1
- 2
- 3
资源评论
奋斗奋斗再奋斗的ajie
- 粉丝: 1196
- 资源: 2908
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 【java毕业设计】电影售票系统源码(ssm+mysql+说明文档).zip
- 【java毕业设计】大学生综合素质评分平台源码(ssm+mysql+说明文档+LW).zip
- Java实现字符串的逆序StringReverse
- 【java毕业设计】宠物医院信息管理系统源码(ssm+mysql+说明文档+LW).zip
- Linux内核5.0基础架构解析: ARM64架构、内存管理及进程管理
- 【java毕业设计】员工在线知识培训考试平台源码(ssm+mysql+说明文档).zip
- 【java毕业设计】演出道具租赁管理系统源码(ssm+mysql+说明文档).zip
- ScanMaster RPP3 脉冲放大器手册
- 【java毕业设计】社区医院儿童预防接种管理系统源码(ssm+mysql+说明文档).zip
- 【java毕业设计】企业台账管理平台源码(ssm+mysql+说明文档+LW).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功