| | |
| | | |
| | | @ExcelProperty("疫苗接种截图") |
| | | private String vaccinationImage; |
| | | |
| | | private Integer status; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.service_community.entity.BcRegion; |
| | | import com.panzhihua.service_community.service.BcRegionService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | /** |
| | | * 关键字查询 |
| | | * |
| | | * @param name 查询实体 |
| | | * @param province 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestParam("name") String name) { |
| | | return this.bcRegionService.pageList(name); |
| | | public R selectAll(@RequestParam("province") String province, @RequestParam("city") String city, @RequestParam("county")String country,@RequestParam("town")String town) { |
| | | return this.bcRegionService.pageList(province,city,country,town); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.BcRegion; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 行政区划表(BcRegion)表数据库访问层 |
| | |
| | | |
| | | /** |
| | | * 姓名查询 |
| | | * @param name |
| | | * @param province |
| | | * @param city |
| | | * @param country |
| | | * @return |
| | | */ |
| | | String selectByName(String name); |
| | | String selectByName(@Param("province") String province,@Param("city") String city,@Param("county")String country,@Param("town")String town); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.BcRegion; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 行政区划表(BcRegion)表服务接口 |
| | |
| | | */ |
| | | public interface BcRegionService extends IService<BcRegion> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param name |
| | | * @return |
| | | */ |
| | | R pageList(String name); |
| | | R pageList(String province, String city, String country,String town); |
| | | } |
| | |
| | | public class BcRegionServiceImpl extends ServiceImpl<BcRegionDao, BcRegion> implements BcRegionService { |
| | | |
| | | @Override |
| | | public R pageList(String name) { |
| | | return R.ok(this.baseMapper.selectByName(name)); |
| | | public R pageList(String province, String city, String country,String town) { |
| | | return R.ok(this.baseMapper.selectByName(province,city,country,town)); |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectByName" resultType="string"> |
| | | select region_code from bc_region where region_name = #{name} |
| | | SELECT distinct left(code,6) FROM area_index_2022 where 1=1 |
| | | <if test="province !=null and province!=''"> |
| | | and province = #{province} |
| | | </if> |
| | | <if test="city !=null and city!=''"> |
| | | and city =#{city} |
| | | </if> |
| | | <if test="county !=null and county!=''"> |
| | | and county like concat(#{county},'%') |
| | | </if> |
| | | <if test="town !=null and town!=''"> |
| | | and town = #{town} |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn"> |
| | | select * from com_act_acid_record |
| | | select t.*,t1.status from com_act_acid_record t left join com_act_acid_danger_member t1 on t.id = t1.record_id |
| | | <where> |
| | | is_del=0 |
| | | t.is_del=0 and t.name is not null and t.id_card is not null and t.phone is not null |
| | | <if test="commonPage.userId !=null"> |
| | | and user_id = #{commonPage.userId} |
| | | and t.user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword!=''"> |
| | | and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%') or id_card like concat('%',#{commonPage.keyword},'%')) |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.startTime !=null and commonPage.startTime !=''"> |
| | | and create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') |
| | | and t.create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') |
| | | </if> |
| | | <if test="commonPage.isAddress !=null"> |
| | | <if test="commonPage.isAddress == 0"> |
| | |
| | | and travel_card like concat('%',#{commonPage.travelCard},'%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="fiveCount" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |