17 files modified
5 files added
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | |
| | | import org.springblade.modules.house.wrapper.HouseWrapper; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 房屋 控制器 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出用户 |
| | | */ |
| | | @GetMapping("export-house") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出房屋", notes = "传入user") |
| | | public void exportUser(HouseVO household, HttpServletResponse response) { |
| | | List<HouseExcel> list = houseService.export(household); |
| | | ExcelUtil.export(response, "房屋数据" + DateUtil.time(), "房屋数据表", list, HouseExcel.class); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.house.vo.HouseRentalTenantVO; |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseRentalExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.house.entity.HouseRentalEntity; |
| | |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 出租屋 控制器 |
| | |
| | | return R.data(houseRentalService.getStatistics(houseRental)); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户 |
| | | */ |
| | | @GetMapping("export-house") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出出租房屋", notes = "传入user") |
| | | public void exportUser(HouseRentalVO houseRentalVO, HttpServletResponse response) { |
| | | List<HouseRentalExcel> list = houseRentalService.export(houseRentalVO); |
| | | ExcelUtil.export(response, "房屋数据" + DateUtil.time(), "房屋数据表", list, HouseRentalExcel.class); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldImporter; |
| | | import org.springblade.modules.system.excel.UserImporter; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | |
| | | import org.springblade.modules.house.wrapper.HouseholdWrapper; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 住户 控制器 |
| | |
| | | return R.status(householdService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入用户 |
| | | */ |
| | | @PostMapping("import-houseHold") |
| | | @ApiOperationSupport(order = 12) |
| | | @ApiOperation(value = "导入住户", notes = "传入excel") |
| | | public R importUser(MultipartFile file, Integer isCovered) { |
| | | HouseHoldImporter houseHoldImporter = new HouseHoldImporter(householdService, isCovered == 1); |
| | | ExcelUtil.save(file, houseHoldImporter, HouseHoldExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户 |
| | | */ |
| | | @GetMapping("export-houseHold") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出住户", notes = "传入user") |
| | | public void exportUser(HouseholdVO household, HttpServletResponse response) { |
| | | List<HouseHoldExcel> list = householdService.export(household); |
| | | ExcelUtil.export(response, "住户户数据" + DateUtil.time(), "住户数据表", list, HouseHoldExcel.class); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | HouseVO getHouseDetail(@Param("house") HouseVO house); |
| | | |
| | | List<HouseExcel> export(HouseVO household); |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="export" resultType="org.springblade.modules.system.excel.HouseExcel"> |
| | | <include refid="selectHouse"/> |
| | | <where> |
| | | <if test="id != null "> and id = #{id}</if> |
| | | <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if> |
| | | <if test="districtCode != null and districtCode != ''"> and district_code = #{districtCode}</if> |
| | | <if test="districtName != null and districtName != ''"> and district_name = #{districtName}</if> |
| | | <if test="houseName != null and houseName != ''"> and house_name = #{houseName}</if> |
| | | <if test="phone != null and phone != ''"> and phone = #{phone}</if> |
| | | <if test="area != null "> and area = #{area}</if> |
| | | <if test="propertyPrice != null "> and property_price = #{propertyPrice}</if> |
| | | <if test="serviceDue != null "> and service_due = #{serviceDue}</if> |
| | | <if test="floor != null "> and floor = #{floor}</if> |
| | | <if test="building != null and building != ''"> and building = #{building}</if> |
| | | <if test="unit != null and unit != ''"> and unit = #{unit}</if> |
| | | <if test="room != null and room != ''"> and room = #{room}</if> |
| | | <if test="buildingNo != null "> and building_no = #{buildingNo}</if> |
| | | <if test="imageUrls != null and imageUrls != ''"> and image_urls = #{imageUrls}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="updateTime != null "> and update_time = #{updateTime}</if> |
| | | <if test="remark != null and remark != ''"> and remark = #{remark}</if> |
| | | <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.modules.house.vo.HouseRentalVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseRentalExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | List<HouseRentalStatistics> getStatistics(@Param("vo") HouseRentalTenantVO houseRental, |
| | | @Param("list") List<String> list); |
| | | |
| | | List<HouseRentalExcel> export(HouseRentalVO houseRentalVO); |
| | | } |
| | |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectHouseRental"> |
| | | select |
| | | id, |
| | | house_code, |
| | | tenant_relationship, |
| | | rental_time, |
| | | due_time, |
| | | termination_time, |
| | | house_status, |
| | | rental_use, |
| | | audit_status, |
| | | file_urls, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | remark, |
| | | is_deleted |
| | | from |
| | | jczz_house_rental |
| | | </sql> |
| | | |
| | | <!--自定义列表查询--> |
| | | <select id="selectHouseRentalPage" resultType="org.springblade.modules.house.vo.HouseRentalTenantVO"> |
| | | SELECT jhr.*,jda.address_name as houseName,b.tenantName,b.phone |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="export" resultType="org.springblade.modules.system.excel.HouseRentalExcel"> |
| | | |
| | | <include refid="selectHouseRental"/> |
| | | <where> |
| | | <if test="id != null "> and id = #{id}</if> |
| | | <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if> |
| | | <if test="tenantRelationship != null "> and tenant_relationship = #{tenantRelationship}</if> |
| | | <if test="rentalTime != null "> and rental_time = #{rentalTime}</if> |
| | | <if test="dueTime != null "> and due_time = #{dueTime}</if> |
| | | <if test="terminationTime != null "> and termination_time = #{terminationTime}</if> |
| | | <if test="houseStatus != null "> and house_status = #{houseStatus}</if> |
| | | <if test="rentalUse != null "> and rental_use = #{rentalUse}</if> |
| | | <if test="auditStatus != null "> and audit_status = #{auditStatus}</if> |
| | | <if test="fileUrls != null and fileUrls != ''"> and file_urls = #{fileUrls}</if> |
| | | <if test="createUser != null "> and create_user = #{createUser}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateUser != null "> and update_user = #{updateUser}</if> |
| | | <if test="updateTime != null "> and update_time = #{updateTime}</if> |
| | | <if test="remark != null and remark != ''"> and remark = #{remark}</if> |
| | | <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | HouseholdVO getHouseholdListById(@Param("household") HouseholdEntity household); |
| | | |
| | | List<HouseHoldExcel> export(HouseholdVO household); |
| | | } |
| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectHousehold"> |
| | | select |
| | | id, |
| | | house_code, |
| | | name, |
| | | phone_number, |
| | | associated_user_id, |
| | | role_type, |
| | | associated_user_name, |
| | | relationship, |
| | | is_primary_contact, |
| | | residential_status, |
| | | gender, |
| | | birthday, |
| | | id_card, |
| | | hkmt_pass, |
| | | passport, |
| | | ethnicity, |
| | | education, |
| | | hukou_registration, |
| | | work_status, |
| | | employer, |
| | | marital_status, |
| | | card_number, |
| | | other_contact, |
| | | current_address, |
| | | disability_cert, |
| | | party_ember, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | remark, |
| | | is_deleted |
| | | from |
| | | jczz_household |
| | | </sql> |
| | | |
| | | <resultMap id="householdAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true"> |
| | | <id property="id" column="id"/> |
| | | <collection property="householdLabelList" javaType="java.util.List" |
| | |
| | | and jh.id = #{household.id} |
| | | </select> |
| | | |
| | | <select id="export" resultType="org.springblade.modules.system.excel.HouseHoldExcel"> |
| | | <include refid="selectHousehold"/> |
| | | <where> |
| | | <if test="id != null "> and id = #{id}</if> |
| | | <if test="houseCode != null and houseCode != ''"> and house_code = #{houseCode}</if> |
| | | <if test="name != null and name != ''"> and name = #{name}</if> |
| | | <if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if> |
| | | <if test="associatedUserId != null "> and associated_user_id = #{associatedUserId}</if> |
| | | <if test="roleType != null "> and role_type = #{roleType}</if> |
| | | <if test="associatedUserName != null and associatedUserName != ''"> and associated_user_name = #{associatedUserName}</if> |
| | | <if test="relationship != null "> and relationship = #{relationship}</if> |
| | | <if test="isPrimaryContact != null "> and is_primary_contact = #{isPrimaryContact}</if> |
| | | <if test="residentialStatus != null "> and residential_status = #{residentialStatus}</if> |
| | | <if test="gender != null "> and gender = #{gender}</if> |
| | | <if test="birthday != null "> and birthday = #{birthday}</if> |
| | | <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if> |
| | | <if test="hkmtPass != null and hkmtPass != ''"> and hkmt_pass = #{hkmtPass}</if> |
| | | <if test="passport != null and passport != ''"> and passport = #{passport}</if> |
| | | <if test="ethnicity != null "> and ethnicity = #{ethnicity}</if> |
| | | <if test="education != null "> and education = #{education}</if> |
| | | <if test="hukouRegistration != null and hukouRegistration != ''"> and hukou_registration = #{hukouRegistration}</if> |
| | | <if test="workStatus != null "> and work_status = #{workStatus}</if> |
| | | <if test="employer != null and employer != ''"> and employer = #{employer}</if> |
| | | <if test="maritalStatus != null "> and marital_status = #{maritalStatus}</if> |
| | | <if test="cardNumber != null and cardNumber != ''"> and card_number = #{cardNumber}</if> |
| | | <if test="otherContact != null and otherContact != ''"> and other_contact = #{otherContact}</if> |
| | | <if test="currentAddress != null and currentAddress != ''"> and current_address = #{currentAddress}</if> |
| | | <if test="disabilityCert != null and disabilityCert != ''"> and disability_cert = #{disabilityCert}</if> |
| | | <if test="partyEmber != null "> and party_ember = #{partyEmber}</if> |
| | | <if test="createUser != null "> and create_user = #{createUser}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateUser != null "> and update_user = #{updateUser}</if> |
| | | <if test="updateTime != null "> and update_time = #{updateTime}</if> |
| | | <if test="remark != null and remark != ''"> and remark = #{remark}</if> |
| | | <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.modules.house.vo.HouseRentalVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseRentalExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Boolean confirmHouseRental(HouseRentalVO houseRental); |
| | | |
| | | List<HouseRentalExcel> export(HouseRentalVO houseRentalVO); |
| | | } |
| | |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 房屋 服务类 |
| | |
| | | * @return |
| | | */ |
| | | boolean saveOrUpdateHouse(HouseEntity house); |
| | | |
| | | void importUserHouse(List<HouseExcel> data, Boolean isCovered); |
| | | |
| | | List<HouseExcel> export(HouseVO household); |
| | | } |
| | |
| | | import org.springblade.common.node.TreeNode; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Object getDetail(HouseholdEntity household); |
| | | |
| | | List<HouseHoldExcel> export(HouseholdVO household); |
| | | |
| | | void importUserHouseHold(List<HouseHoldExcel> data, Boolean isCovered); |
| | | } |
| | |
| | | package org.springblade.modules.house.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.house.dto.UserHouseLabelDTO; |
| | |
| | | List<Integer> list = baseMapper.getUserLabelList(userHouseLabelDTO); |
| | | return list; |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.house.mapper.HouseRentalMapper; |
| | | import org.springblade.modules.house.service.IHouseRentalService; |
| | | import org.springblade.modules.house.vo.HouseTenantVO; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseRentalExcel; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | // 修改 |
| | | return updateById(houseRental); |
| | | } |
| | | |
| | | @Override |
| | | public List<HouseRentalExcel> export(HouseRentalVO houseRentalVO) { |
| | | List<HouseRentalExcel> houseRentalExcels = baseMapper.export(houseRentalVO); |
| | | return houseRentalExcels; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import org.springblade.modules.house.mapper.HouseMapper; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.label.service.ILabelService; |
| | | import org.springblade.modules.system.excel.HouseExcel; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 房屋 服务实现类 |
| | |
| | | //插入数据 |
| | | return save(house); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void importUserHouse(List<HouseExcel> data, Boolean isCovered) { |
| | | data.forEach(houseExcel -> { |
| | | HouseEntity HouseEntity = Objects.requireNonNull(BeanUtil.copy(houseExcel, HouseEntity.class)); |
| | | this.save(HouseEntity); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public List<HouseExcel> export(HouseVO household) { |
| | | List<HouseExcel> houseExcels = baseMapper.export(household); |
| | | return houseExcels; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.node.TreeNode; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.house.mapper.HouseholdMapper; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.system.entity.DictBiz; |
| | | import org.springblade.modules.system.excel.HouseHoldExcel; |
| | | import org.springblade.modules.system.service.IDictBizService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 住户 服务实现类 |
| | |
| | | public Object getDetail(HouseholdEntity household) { |
| | | return baseMapper.getHouseholdListById(household); |
| | | } |
| | | |
| | | @Override |
| | | public List<HouseHoldExcel> export(HouseholdVO household) { |
| | | List<HouseHoldExcel> userHouseHoldExcels = baseMapper.export(household); |
| | | return userHouseHoldExcels; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importUserHouseHold(List<HouseHoldExcel> data, Boolean isCovered) { |
| | | data.forEach(houseHoldExcel -> { |
| | | HouseholdEntity houseHoldEntity = Objects.requireNonNull(BeanUtil.copy(houseHoldExcel, HouseholdEntity.class)); |
| | | this.save(houseHoldEntity); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class HouseExcel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 2L; |
| | | |
| | | /** 主键id */ |
| | | @ExcelProperty( "主键ID") |
| | | private Long id; |
| | | |
| | | /** 门牌地址编码 */ |
| | | @ExcelProperty( "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | /** 小区编码 */ |
| | | @ExcelProperty( "小区编码") |
| | | private String districtCode; |
| | | |
| | | /** 小区 */ |
| | | @ExcelProperty( "小区") |
| | | private String districtName; |
| | | |
| | | /** 房屋名称 */ |
| | | @ExcelProperty( "房屋名称") |
| | | private String houseName; |
| | | |
| | | /** 绑定手机 */ |
| | | @ExcelProperty( "绑定手机") |
| | | private String phone; |
| | | |
| | | /** 面积 */ |
| | | @ExcelProperty( "面积") |
| | | private BigDecimal area; |
| | | |
| | | /** 物业单价 */ |
| | | @ExcelProperty( "物业单价") |
| | | private BigDecimal propertyPrice; |
| | | |
| | | /** 服务到期 */ |
| | | @ExcelProperty( "服务到期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date serviceDue; |
| | | |
| | | /** 楼层 */ |
| | | @ExcelProperty( "楼层") |
| | | private Integer floor; |
| | | |
| | | /** 幢 */ |
| | | @ExcelProperty( "幢") |
| | | private String building; |
| | | |
| | | /** 单元 */ |
| | | @ExcelProperty( "单元") |
| | | private String unit; |
| | | |
| | | /** 室 */ |
| | | @ExcelProperty( "室") |
| | | private String room; |
| | | |
| | | /** 幢编号 */ |
| | | @ExcelProperty( "幢编号") |
| | | private Integer buildingNo; |
| | | |
| | | /** 图片URLS */ |
| | | @ExcelProperty( "图片URLS") |
| | | private String imageUrls; |
| | | |
| | | /** 创建人 */ |
| | | @ExcelProperty( "创建人") |
| | | private String createUser; |
| | | |
| | | /** 创建时间 */ |
| | | @ExcelProperty( "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @ExcelProperty( "更新人") |
| | | private String updateUser; |
| | | |
| | | /** 更新时间 */ |
| | | @ExcelProperty( "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** 备注 */ |
| | | @ExcelProperty( "备注") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class HouseHoldExcel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 2L; |
| | | |
| | | |
| | | /** 主键id */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "主键ID") |
| | | private Long id; |
| | | |
| | | /** 门牌地址编码 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | /** 姓名 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "姓名") |
| | | private String name; |
| | | |
| | | /** 手机号 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "手机号") |
| | | private String phoneNumber; |
| | | |
| | | /** 绑定用户ID */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "绑定用户ID") |
| | | private Long associatedUserId; |
| | | |
| | | /** 角色 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "角色 ") |
| | | private Integer roleType; |
| | | |
| | | /** 绑定用户名称 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "绑定用户名称") |
| | | private String associatedUserName; |
| | | |
| | | /** 与角色关系(业主,父子,其他) */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "与角色关系(业主,父子,其他)") |
| | | private Integer relationship; |
| | | |
| | | /** 是否主要联系人 1:是 0:否 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "是否主要联系人 1:是 0:否") |
| | | private Integer isPrimaryContact; |
| | | |
| | | /** 居住状态 1: 是 0:否 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "居住状态 1: 是 0:否") |
| | | private Integer residentialStatus; |
| | | |
| | | /** 性别 1: 男 0:女 2: 未知 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "性别 1: 男 0:女 2: 未知") |
| | | private Short gender; |
| | | |
| | | /** 生日 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "生日") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date birthday; |
| | | |
| | | /** 身份证 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "身份证") |
| | | private String idCard; |
| | | |
| | | /** 港澳台通行证 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "港澳台通行证") |
| | | private String hkmtPass; |
| | | |
| | | /** 护照 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "护照") |
| | | private String passport; |
| | | |
| | | /** 民族 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "民族") |
| | | private Integer ethnicity; |
| | | |
| | | /** 学历 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "学历") |
| | | private Integer education; |
| | | |
| | | /** 户籍登记地 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "户籍登记地") |
| | | private String hukouRegistration; |
| | | |
| | | /** 工作状态 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "工作状态") |
| | | private Integer workStatus; |
| | | |
| | | /** 工作单位 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "工作单位") |
| | | private String employer; |
| | | |
| | | /** 婚姻状态 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "婚姻状态") |
| | | private Integer maritalStatus; |
| | | |
| | | /** 车牌号 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "车牌号") |
| | | private String cardNumber; |
| | | |
| | | /** 其他联系方式 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "其他联系方式") |
| | | private String otherContact; |
| | | |
| | | /** 现居住地址 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "现居住地址") |
| | | private String currentAddress; |
| | | |
| | | /** 残疾证 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "残疾证") |
| | | private String disabilityCert; |
| | | |
| | | /** 是否党员 1:党员 2:群众 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "是否党员 1:党员 2:群众") |
| | | private Integer partyEmber; |
| | | |
| | | /** 创建人 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "创建人") |
| | | private Long createUser; |
| | | |
| | | /** 创建时间 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @ColumnWidth(15) |
| | | @ExcelIgnore |
| | | @ExcelProperty( "更新人") |
| | | private Long updateUser; |
| | | |
| | | /** 更新时间 */ |
| | | @ExcelProperty( "更新时间") |
| | | @ColumnWidth(15) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** 备注 */ |
| | | @ColumnWidth(15) |
| | | @ExcelProperty( "备注") |
| | | private String remark; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @RequiredArgsConstructor |
| | | public class HouseHoldImporter implements ExcelImporter<HouseHoldExcel> { |
| | | |
| | | private final IHouseholdService iHouseholdService; |
| | | private final Boolean isCovered; |
| | | |
| | | @Override |
| | | public void save(List<HouseHoldExcel> data) { |
| | | iHouseholdService.importUserHouseHold(data, isCovered); |
| | | } |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @RequiredArgsConstructor |
| | | public class HouseImporter implements ExcelImporter<HouseExcel> { |
| | | |
| | | private final IHouseService iHouseService; |
| | | private final Boolean isCovered; |
| | | |
| | | @Override |
| | | public void save(List<HouseExcel> data) { |
| | | iHouseService.importUserHouse(data, isCovered); |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class HouseRentalExcel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 2L; |
| | | |
| | | /** 主键ID */ |
| | | @ExcelProperty( "主键ID") |
| | | private Long id; |
| | | |
| | | /** 门牌地址编码 */ |
| | | @ExcelProperty( "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | /** 租客关系 1: 同一户 2:不同一户 */ |
| | | @ExcelProperty( "租客关系 1: 同一户 2:不同一户") |
| | | private Integer tenantRelationship; |
| | | |
| | | /** 租房时间 */ |
| | | @ExcelProperty( "租房时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date rentalTime; |
| | | |
| | | /** 到期时间 */ |
| | | @ExcelProperty( "到期时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date dueTime; |
| | | |
| | | /** 终止时间 */ |
| | | @ExcelProperty( "终止时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date terminationTime; |
| | | |
| | | /** 房屋状态 1:部分出租 2:全部出租 */ |
| | | @ExcelProperty( "房屋状态 1:部分出租 2:全部出租") |
| | | private Integer houseStatus; |
| | | |
| | | /** 租房用途 1:仓库 2:办公 3:商用 4:居住 */ |
| | | @ExcelProperty( "租房用途 1:仓库 2:办公 3:商用 4:居住") |
| | | private Integer rentalUse; |
| | | |
| | | /** 审核状态 0: 待审核 1: 审核通过 2: 审核不通过 10未到期; 20即将到期 ;30 已到期 */ |
| | | @ExcelProperty( "审核状态 0: 待审核 1: 审核通过 2: 审核不通过 10未到期; 20即将到期 ;30 已到期") |
| | | private Integer auditStatus; |
| | | |
| | | /** 合同附件URL */ |
| | | @ExcelProperty( "合同附件URL") |
| | | private String fileUrls; |
| | | |
| | | /** 创建人 */ |
| | | @ExcelProperty( "创建人") |
| | | private Long createUser; |
| | | |
| | | /** 创建时间 */ |
| | | @ExcelProperty( "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @ExcelProperty( "更新人") |
| | | private Long updateUser; |
| | | |
| | | /** 更新时间 */ |
| | | @ExcelProperty( "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** 备注 */ |
| | | @ExcelProperty( "备注") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | <select id="selectTaskPage" resultMap="taskResultMap"> |
| | | SELECT |
| | | jt.`status`, |
| | | jt.`id`, |
| | | jt.`name`, |
| | | jt.frequency, |
| | | jda.address_name, |
| | | jt.create_time |
| | | jt.id, |
| | | jt.name, |
| | | jt.type, |
| | | jt.frequency, |
| | | jt.remark, |
| | | jt.create_time, |
| | | jt.create_user, |
| | | jt.update_time, |
| | | jt.update_user, |
| | | jt.status, |
| | | jt.tenant_id, |
| | | jt.create_dept, |
| | | jt.is_deleted, |
| | | jt.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | |
| | | <if test="task.name != null and task.name != ''"> |
| | | and jt.name like concat('%', #{task.name}, '%') |
| | | </if> |
| | | <if test="task.id != null ">and id = #{task.id}</if> |
| | | <if test="task.type != null ">and type = #{task.type}</if> |
| | | <if test="task.remark != null and task.remark != ''">and remark = #{task.remark}</if> |
| | | <if test="task.createTime != null ">and create_time = #{task.createTime}</if> |
| | | <if test="task.createUser != null ">and create_user = #{task.createUser}</if> |
| | | <if test="task.updateTime != null ">and update_time = #{task.updateTime}</if> |
| | | <if test="task.updateUser != null ">and update_user = #{task.updateUser}</if> |
| | | <if test="task.tenantId != null and task.tenantId != ''">and tenant_id = #{task.tenantId}</if> |
| | | <if test="task.createDept != null ">and create_dept = #{task.createDept}</if> |
| | | <if test="task.isDeleted != null ">and is_deleted = #{task.isDeleted}</if> |
| | | <if test="task.houseCode != null and task.houseCode != ''">and house_code = #{task.houseCode}</if> |
| | | order by jt.create_time desc |
| | | |
| | | </select> |