| | |
| | | <select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO"> |
| | | select |
| | | jpcd.*, |
| | | jd.name as districtName |
| | | jd.name as districtName, |
| | | jpc.name as propertyCompanyName |
| | | from jczz_property_company_district jpcd |
| | | left join jczz_district jd on jd.id = jpcd.district_id and jd.is_deleted = 0 |
| | | left join jczz_property_company jpc on jpc.id = jpcd.property_company_id and jpc.is_deleted = 0 |
| | | where jpcd.is_deleted = 0 |
| | | <if test="propertyCompanyDistrict.propertyCompanyId!=null"> |
| | | and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId} |
| | |
| | | <if test="propertyCompanyDistrict.districtName!=null and propertyCompanyDistrict.districtName!=''"> |
| | | and jd.name like concat('%',#{propertyCompanyDistrict.districtName},'%') |
| | | </if> |
| | | <if test="propertyCompanyDistrict.propertyCompanyName!=null and propertyCompanyDistrict.propertyCompanyName!=''"> |
| | | and jpc.name like concat('%',#{propertyCompanyDistrict.propertyCompanyName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | private String districtName; |
| | | |
| | | /** |
| | | * 物业公司名称 |
| | | */ |
| | | private String propertyCompanyName; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "名称") |
| | | private String name; |
| | | /** |
| | | * 类型 |
| | | * 类型 1:系统 2:社区 |
| | | */ |
| | | @ApiModelProperty(value = "类型") |
| | | @ApiModelProperty(value = "类型 1:系统 2:社区") |
| | | private String type; |
| | | /** |
| | | * 内容 |
| | |
| | | private String junpUrl; |
| | | |
| | | /** |
| | | * 所属社区编号 |
| | | */ |
| | | @ApiModelProperty(value = "所属社区编号") |
| | | private String communityCode; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | |
| | | </resultMap> |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectRotationPage" resultMap="rotationResultMap"> |
| | | select * from jczz_rotation where is_deleted = 0 |
| | | <select id="selectRotationPage" resultType="org.springblade.modules.rotation.vo.RotationVO"> |
| | | select |
| | | jr.*,br.name as communityName |
| | | from jczz_rotation jr |
| | | left join blade_region br on br.code = jr.community_code |
| | | where jr.is_deleted = 0 |
| | | <if test="rotation.name!=null and rotation.name!=''"> |
| | | and name like concat('%',#{rotation.name},'%') |
| | | and jr.name like concat('%',#{rotation.name},'%') |
| | | </if> |
| | | <if test="rotation.type!=null"> |
| | | and jr.type = #{rotation.type} |
| | | </if> |
| | | <if test="rotation.communityName!=null and rotation.communityName!=''"> |
| | | and br.name like concat('%',#{rotation.communityName},'%') |
| | | </if> |
| | | <if test="rotation.regionCode!=null and rotation.regionCode!=''"> |
| | | and jr.community_code like concat('%',#{rotation.regionCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | package org.springblade.modules.rotation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.rotation.entity.RotationEntity; |
| | | import org.springblade.modules.rotation.vo.RotationVO; |
| | | import org.springblade.modules.rotation.mapper.RotationMapper; |
| | | import org.springblade.modules.rotation.service.IRotationService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | |
| | | @Service |
| | | public class RotationServiceImpl extends ServiceImpl<RotationMapper, RotationEntity> implements IRotationService { |
| | | |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public IPage<RotationVO> selectRotationPage(IPage<RotationVO> page, RotationVO rotation) { |
| | | // Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | // if (null!=dept && !AuthUtil.isAdministrator()){ |
| | | // rotation.setRegionCode(dept.getRegionCode()); |
| | | // } |
| | | return page.setRecords(baseMapper.selectRotationPage(page, rotation)); |
| | | } |
| | | |
| | |
| | | public class RotationVO extends RotationEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 区域编号 |
| | | */ |
| | | private String regionCode; |
| | | |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | private String communityName; |
| | | |
| | | } |
| | |
| | | <!--自定义分页查询--> |
| | | <select id="selectECallEventPage" resultType="org.springblade.modules.task.vo.ECallEventVO"> |
| | | select |
| | | * |
| | | from jczz_e_call_event |
| | | where is_deleted = 0 |
| | | jece.*, |
| | | br.name as communityName |
| | | from jczz_e_call_event jece |
| | | left join blade_region br on br.code = jece.community_code |
| | | where jece.is_deleted = 0 |
| | | <if test="eCallEvent.name!=null and eCallEvent.name!=''"> |
| | | and name like concat('%',#{eCallEvent.name},'%') |
| | | and jece.name like concat('%',#{eCallEvent.name},'%') |
| | | </if> |
| | | <if test="eCallEvent.phone!=null and eCallEvent.phone!=''"> |
| | | and phone like concat('%',#{eCallEvent.phone},'%') |
| | | and jece.phone like concat('%',#{eCallEvent.phone},'%') |
| | | </if> |
| | | <if test="eCallEvent.realName!=null and eCallEvent.realName!=''"> |
| | | and real_name like concat('%',#{eCallEvent.realName},'%') |
| | | and jece.real_name like concat('%',#{eCallEvent.realName},'%') |
| | | </if> |
| | | <if test="eCallEvent.regionCode!=null and eCallEvent.regionCode!=''"> |
| | | and community_code like concat('%',#{eCallEvent.regionCode},'%') |
| | | and jece.community_code like concat('%',#{eCallEvent.regionCode},'%') |
| | | </if> |
| | | <if test="eCallEvent.communityName!=null and eCallEvent.communityName!=''"> |
| | | and br.name like concat('%',#{eCallEvent.communityName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | */ |
| | | private String regionCode; |
| | | |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | private String communityName; |
| | | |
| | | } |