Merge remote-tracking branch 'origin/master'
| | |
| | | return R.status(districtService.removeByIds(Func.toStrList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 获取小区树 |
| | | */ |
| | | @GetMapping("/getDistrictTree") |
| | | public R getDistrictTree(DistrictVO district) { |
| | | return R.data(districtService.getDistrictTree(district)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.district.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.MapKey; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.modules.district.entity.DistrictEntity; |
| | | import org.springblade.modules.district.vo.DistrictVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区表 Mapper 接口 |
| | |
| | | */ |
| | | List<DistrictVO> selectDistrictPage(IPage page,@Param("district") DistrictVO district); |
| | | |
| | | /** |
| | | * 获取小区树 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | @MapKey(value = "id") |
| | | Map<String, TreeStringNode> getDistrictTree(@Param("district") DistrictVO district); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义分页--> |
| | | <select id="getDistrictTree" resultType="org.springblade.common.node.TreeStringNode"> |
| | | SELECT |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region where district_code = '361102' |
| | | union all |
| | | ( |
| | | select |
| | | id, |
| | | community_code as parentId, |
| | | name |
| | | from jczz_district |
| | | where is_deleted = 0 |
| | | ) |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | IPage<DistrictVO> selectDistrictPage(IPage<DistrictVO> page, DistrictVO district); |
| | | |
| | | |
| | | /** |
| | | * 获取小区树 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | Object getDistrictTree(DistrictVO district); |
| | | } |
| | |
| | | package org.springblade.modules.district.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.modules.district.entity.DistrictEntity; |
| | | import org.springblade.modules.district.vo.DistrictVO; |
| | | import org.springblade.modules.district.mapper.DistrictMapper; |
| | |
| | | return page.setRecords(baseMapper.selectDistrictPage(page, district)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取小区树 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getDistrictTree(DistrictVO district) { |
| | | return NodeTreeUtil.getStringNodeTree(baseMapper.getDistrictTree(district)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "图片URLS") |
| | | private String imageUrls; |
| | | /** |
| | | * 网格id |
| | | */ |
| | | @ApiModelProperty(value = "网格id") |
| | | private Integer gridId; |
| | | |
| | | /** |
| | | * 创建人 |
| | |
| | | private String imageUrls; |
| | | |
| | | /** |
| | | * 网格id |
| | | */ |
| | | @ApiModelProperty(value = "网格id") |
| | | private Integer gridId; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(propertyCapitalApplyService.removeByIds(Func.toLongList(ids))); |
| | | return R.status(propertyCapitalApplyService.removeByIds(Func.toIntList(ids))); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 物业公司列表查询(不分页) |
| | | */ |
| | | @GetMapping("/getPropertyCompanyList") |
| | | public R getPropertyCompanyList(PropertyCompanyVO propertyCompany) { |
| | | return R.data(propertyCompanyService.getPropertyCompanyList(propertyCompany)); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(propertyCompanyService.removeByIds(Func.toLongList(ids))); |
| | | return R.status(propertyCompanyService.removeByIds(Func.toIntList(ids))); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(propertyCompanyDistrictService.removeByIds(Func.toLongList(ids))); |
| | | return R.status(propertyCompanyDistrictService.removeByIds(Func.toIntList(ids))); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.property.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | * 预计开工时间 |
| | | */ |
| | | @ApiModelProperty(value = "预计开工时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date runTime; |
| | | /** |
| | | * 预计竣工时间 |
| | | */ |
| | | @ApiModelProperty(value = "预计竣工时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date completedTime; |
| | | /** |
| | | * 项目摘要 |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty("创建时间") |
| | | private Date createTime; |
| | | |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty("更新时间") |
| | | private Date updateTime; |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.property.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | |
| | | * 合同开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "合同开始时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date startTime; |
| | | /** |
| | | * 合同结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "合同结束时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date endTime; |
| | | /** |
| | | * 简介 |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | /** |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | /** |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("更新时间") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | package org.springblade.modules.property.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | * 省编号 |
| | | */ |
| | | @ApiModelProperty(value = "省编号") |
| | | private String provinceCode; |
| | | private String province; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @ApiModelProperty(value = "市编号") |
| | | private String cityCode; |
| | | private String city; |
| | | /** |
| | | * 区县编号 |
| | | */ |
| | | @ApiModelProperty(value = "区县编号") |
| | | private String countyCode; |
| | | private String area; |
| | | /** |
| | | * 简介 |
| | | */ |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | /** |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | /** |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("更新时间") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | package org.springblade.modules.property.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.vo.PropertyCompanyVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | * @param propertyCompany |
| | | * @return |
| | | */ |
| | | List<PropertyCompanyVO> selectPropertyCompanyPage(IPage page, PropertyCompanyVO propertyCompany); |
| | | List<PropertyCompanyVO> selectPropertyCompanyPage(IPage page, |
| | | @Param("propertyCompany") PropertyCompanyVO propertyCompany); |
| | | |
| | | |
| | | /** |
| | | * 物业公司列表查询(不分页) |
| | | * @param propertyCompany |
| | | * @return |
| | | */ |
| | | List<PropertyCompanyVO> getPropertyCompanyList(@Param("propertyCompany") PropertyCompanyVO propertyCompany); |
| | | } |
| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCompanyPage" resultMap="propertyCompanyResultMap"> |
| | | select * from jczz_property_company where is_deleted = 0 |
| | | <if test="propertyCompany.name!=null and propertyCompany.name!=''"> |
| | | and name like concat('%',#{propertyCompany.name},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <!--物业公司列表查询(不分页)--> |
| | | <select id="getPropertyCompanyList" resultMap="propertyCompanyResultMap"> |
| | | select * from jczz_property_company where is_deleted = 0 |
| | | <if test="propertyCompany.name!=null and propertyCompany.name!=''"> |
| | | and name like concat('%',#{propertyCompany.name},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | IPage<PropertyCompanyVO> selectPropertyCompanyPage(IPage<PropertyCompanyVO> page, PropertyCompanyVO propertyCompany); |
| | | |
| | | |
| | | /** |
| | | * 物业公司列表查询(不分页) |
| | | * @param propertyCompany |
| | | * @return |
| | | */ |
| | | Object getPropertyCompanyList(PropertyCompanyVO propertyCompany); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物业公司 服务实现类 |
| | | * |
| | |
| | | @Service |
| | | public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMapper, PropertyCompanyEntity> implements IPropertyCompanyService { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param propertyCompany |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<PropertyCompanyVO> selectPropertyCompanyPage(IPage<PropertyCompanyVO> page, PropertyCompanyVO propertyCompany) { |
| | | return page.setRecords(baseMapper.selectPropertyCompanyPage(page, propertyCompany)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 物业公司列表查询(不分页) |
| | | * @param propertyCompany |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PropertyCompanyVO> getPropertyCompanyList(PropertyCompanyVO propertyCompany) { |
| | | return baseMapper.getPropertyCompanyList(propertyCompany); |
| | | } |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | @GetMapping("/select") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "下拉数据源", notes = "传入tenant") |
| | | public R<List<Region>> select(@RequestParam(required = false, defaultValue = "00") String code) { |
| | | List<Region> list = regionService.list(Wrappers.<Region>query().lambda().eq(Region::getParentCode, code)); |
| | | public R<List<Region>> select(@RequestParam(required = false, defaultValue = "00") String code,Integer level) { |
| | | LambdaQueryWrapper<Region> wrapper = Wrappers.<Region>query().lambda().eq(Region::getParentCode, code); |
| | | if (null!=level){ |
| | | wrapper.eq(Region::getRegionLevel,level); |
| | | } |
| | | List<Region> list = regionService.list(wrapper); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | <!--根据父编号查询所有的下级--> |
| | | <select id="getTreeList" resultType="org.springblade.common.node.TreeStringNode"> |
| | | SELECT |
| | | br.code as id,br.parent_code as parentId,br.name as name |
| | | FROM |
| | | ( |
| | | SELECT |
| | | @ids AS ids, |
| | | ( SELECT @ids := GROUP_CONCAT( code ) FROM blade_region WHERE FIND_IN_SET( parent_code, @ids ) ) AS cids |
| | | FROM |
| | | blade_region |
| | | WHERE |
| | | @ids IS NOT NULL |
| | | AND @ids := #{parentCode} |
| | | ) id, |
| | | blade_region br |
| | | WHERE |
| | | FIND_IN_SET(br.parent_code,ids) |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region where district_code = '361102' |
| | | </select> |
| | | |
| | | </mapper> |