# 智慧社区管理系统-核心信息管理-02物业收费管理
创始人
2024-03-16 07:33:02
0

一 后端

1:entity

package com.woniu.community.entity;import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;@Data
@AllArgsConstructor
@NoArgsConstructor
public class PropertyInfo {private int  id;private int typeId;private Double money;private String startDate;private String endDate;private Integer status;private int houseId;private  String remarks;private String numbers;private String userName;private String typeName;}

2:PropertyInfoMapper

package com.woniu.community.mapper;import com.woniu.community.entity.PropertyInfo;import java.util.List;public interface PropertyInfoMapper {List selectAll(int start,int size ,String numbers,Integer status);int  count(String numbers,Integer status);int  insertPropertyInfo(PropertyInfo propertyInfo);int  deletePropertyInfo(int id);int updatePropertyInfo(PropertyInfo propertyInfo);PropertyInfo getById(int id);
}

3:IPropertyInfoService

package com.woniu.community.service;import com.woniu.community.entity.HttpResult;
import com.woniu.community.entity.PropertyInfo;import java.util.List;public interface IPropertyInfoService {HttpResult selectAll(int pageIndex, int pageSize , String numbers, Integer status);HttpResult  insertPropertyInfo(PropertyInfo propertyInfo);HttpResult  deletePropertyInfo(int id);HttpResult updatePropertyInfo(PropertyInfo propertyInfo);HttpResult getById(int id);}

4:PropertyInfoServiceImpl

package com.woniu.community.service.impl;import com.woniu.community.entity.HttpResult;
import com.woniu.community.entity.PropertyInfo;
import com.woniu.community.mapper.PropertyInfoMapper;
import com.woniu.community.service.IPropertyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.List;@Service
public class PropertyInfoServiceImpl implements IPropertyInfoService {@Autowired(required=false)private PropertyInfoMapper propertyInfoMapper;@Overridepublic HttpResult selectAll(int pageIndex, int pageSize, String numbers, Integer status) {HttpResult  result=null;List propertyInfos = propertyInfoMapper.selectAll((pageIndex - 1) * pageSize, pageSize, numbers, status);int count = propertyInfoMapper.count(numbers, status);if (propertyInfos!=null&&propertyInfos.size()>0){result=new HttpResult(propertyInfos,count,200,null);}else{result=new HttpResult(null,0,500,null);}return result;}@Overridepublic HttpResult insertPropertyInfo(PropertyInfo propertyInfo) {HttpResult  result=null;int count = propertyInfoMapper.insertPropertyInfo(propertyInfo);if (count>0){result=new HttpResult(null,0,200,"新增成功");}else{result=new HttpResult(null,0,500,"新增失败");}return result;}@Overridepublic HttpResult deletePropertyInfo(int id) {HttpResult  result=null;int count = propertyInfoMapper.deletePropertyInfo(id);if (count>0){result=new HttpResult(null,0,200,"删除成功");}else{result=new HttpResult(null,0,500,"删除失败");}return result;}@Overridepublic HttpResult updatePropertyInfo(PropertyInfo propertyInfo) {HttpResult  result=null;int count = propertyInfoMapper.updatePropertyInfo(propertyInfo);if (count>0){result=new HttpResult(null,0,200,"修改成功");}else{result=new HttpResult(null,0,500,"修改失败");}return result;}@Overridepublic HttpResult getById(int id) {HttpResult  result=null;PropertyInfo info = propertyInfoMapper.getById(id);if (info!=null){result=new HttpResult(info,0,200,null);}else{result=new HttpResult(null,0,500,"没有更多数据");}return result;}
}

5:PropertyInfoController

package com.woniu.community.controller;import com.woniu.community.entity.HttpResult;
import com.woniu.community.entity.PropertyInfo;
import com.woniu.community.service.IPropertyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
@RequestMapping ("/property")
@CrossOrigin(origins = "*")
public class PropertyInfoController {@Autowiredprivate IPropertyInfoService  iPropertyInfoService;@RequestMapping("/list")HttpResult selectAll(int pageIndex, int pageSize , String numbers, Integer status){return iPropertyInfoService.selectAll(pageIndex,pageSize,numbers,status);}@RequestMapping("/add")HttpResult  insertPropertyInfo(PropertyInfo propertyInfo){return  iPropertyInfoService.insertPropertyInfo(propertyInfo);}@RequestMapping("/delete")HttpResult  deletePropertyInfo(int id){return iPropertyInfoService.deletePropertyInfo(id);}@RequestMapping("/update")HttpResult updatePropertyInfo(PropertyInfo propertyInfo){return  iPropertyInfoService.updatePropertyInfo(propertyInfo);}@RequestMapping("/info")HttpResult getById(int id){return iPropertyInfoService.getById(id);}
}

6:PropertyInfoMapper.xml



insert  into property_info(house_id,type_id,start_date,end_date,money,status)values (#{houseId},#{typeId},#{startDate},#{endDate},#{money},#{status})delete  from property_info where id=#{id}update property_info set money=#{money},status=#{status} where id=#{id}

二 前端代码




Title


房间号:
缴费状态:
物业收费
房间号房东费用类型开始时间结束时间金额状态操作
{{p.numbers}}{{p.userName}}{{p.typeName}}{{p.startDate}}{{p.endDate}}{{p.money}}{{p.status==1?"已缴费":"未缴费"}}



Title


{{title}}
房间号:
费用类型:
金额
状态:

三 运行结果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

相关内容

热门资讯

监控摄像头接入GB28181平... 流程简介将监控摄像头的视频在网站和APP中直播,要解决的几个问题是:1&...
Windows10添加群晖磁盘... 在使用群晖NAS时,我们需要通过本地映射的方式把NAS映射成本地的一块磁盘使用。 通过...
protocol buffer... 目录 目录 什么是protocol buffer 1.protobuf 1.1安装  1.2使用...
在Word、WPS中插入AxM... 引言 我最近需要写一些文章,在排版时发现AxMath插入的公式竟然会导致行间距异常&#...
Fluent中创建监测点 1 概述某些仿真问题,需要创建监测点,用于获取空间定点的数据࿰...
educoder数据结构与算法...                                                   ...
MySQL下载和安装(Wind... 前言:刚换了一台电脑,里面所有东西都需要重新配置,习惯了所...
MFC文件操作  MFC提供了一个文件操作的基类CFile,这个类提供了一个没有缓存的二进制格式的磁盘...
有效的括号 一、题目 给定一个只包括 '(',')','{','}'...
【Ctfer训练计划】——(三... 作者名:Demo不是emo  主页面链接:主页传送门 创作初心ÿ...