1.房屋查询返回房屋标签颜色
2.新增预警接口处置和宣传
6 files modified
18 files added
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取民警(公安)下级所有区域code |
| | | * |
| | | * @return regionCode |
| | | */ |
| | | public static List<String> getPoliceRegionChildCodesByDeptId(String deptId) { |
| | | //多个部门按逗号分割 |
| | | List<String> deptIdList = Arrays.asList(deptId.split(",")); |
| | | |
| | | //所有行政区划code |
| | | List<String> allRegionList = new ArrayList<>(); |
| | | deptIdList.forEach(id->{ |
| | | List<String> list = new ArrayList<>(); |
| | | // 查询对应的区域编号code |
| | | Dept dept = deptService.getById(id); |
| | | if (null!=dept && !Strings.isBlank(dept.getRegionCode()) && !AuthUtil.isAdministrator()){ |
| | | list = getPoliceRegionChildCodes(dept.getRegionCode()); |
| | | //行政区划不为空添加进集合 |
| | | if (list.size()>0){ |
| | | allRegionList.addAll(list); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 去重 |
| | | List<String> collect = allRegionList.stream().distinct().collect(Collectors.toList()); |
| | | return collect; |
| | | } |
| | | |
| | | /** |
| | | * 获取下级所有区域code |
| | | * |
| | | * @return regionCode |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取公安下级所有区域code |
| | | * |
| | | * @return regionCode |
| | | */ |
| | | public static List<String> getPoliceRegionChildCodes(String regionCode) { |
| | | if (regionCode == null) { |
| | | return null; |
| | | } |
| | | List<String> regionCodeList = CacheUtil.get(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, List.class); |
| | | if (regionCodeList == null || regionCodeList.size()==0) { |
| | | regionCodeList = new ArrayList<>(); |
| | | List<Region> deptChild = getPoliceRegionChild(regionCode); |
| | | if (deptChild != null) { |
| | | List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList()); |
| | | regionCodeList.addAll(collect); |
| | | } |
| | | regionCodeList.add(regionCode); |
| | | CacheUtil.put(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, regionCodeList); |
| | | } |
| | | return regionCodeList; |
| | | } |
| | | |
| | | /** |
| | | * 获取民警下级区域 |
| | | * @param regionCode |
| | | * @return |
| | | */ |
| | | private static List<Region> getPoliceRegionChild(String regionCode) { |
| | | return CacheUtil.get(SYS_CACHE, REGION_CHILD_CODE, regionCode, () -> regionService.getPoliceRegionChild(regionCode)); |
| | | } |
| | | |
| | | /** |
| | | * 获取下级区域 |
| | | * @param regionCode |
| | | * @return |
| 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.backblast.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | 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.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.modules.backblast.wrapper.BackblastPubRecordWrapper; |
| | | import org.springblade.modules.backblast.service.IBackblastPubRecordService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-backblastPubRecord/backblastPubRecord") |
| | | @Api(value = "反炸宣传记录表", tags = "反炸宣传记录表接口") |
| | | public class BackblastPubRecordController{ |
| | | |
| | | private final IBackblastPubRecordService backblastPubRecordService; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入backblastPubRecord") |
| | | public R detail(BackblastPubRecordEntity backblastPubRecord) { |
| | | BackblastPubRecordEntity detail = backblastPubRecordService.getOne(Condition.getQueryWrapper(backblastPubRecord)); |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 反炸宣传记录表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入backblastPubRecord") |
| | | public R<IPage<BackblastPubRecordVO>> list(BackblastPubRecordEntity backblastPubRecord, Query query) { |
| | | IPage<BackblastPubRecordEntity> pages = backblastPubRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastPubRecord)); |
| | | return R.data(BackblastPubRecordWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入backblastPubRecord") |
| | | public R<IPage<BackblastPubRecordVO>> page(BackblastPubRecordVO backblastPubRecord, Query query) { |
| | | IPage<BackblastPubRecordVO> pages = backblastPubRecordService.selectBackblastPubRecordPage(Condition.getPage(query), backblastPubRecord); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入backblastPubRecord") |
| | | public R save(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) { |
| | | return R.status(backblastPubRecordService.save(backblastPubRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入backblastPubRecord") |
| | | public R update(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) { |
| | | return R.status(backblastPubRecordService.updateById(backblastPubRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 自定义新增/修改 |
| | | */ |
| | | @PostMapping("/addOrUpdate") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "自定义新增/修改", notes = "传入backblastPubRecord") |
| | | public R addOrUpdate(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) { |
| | | return R.status(backblastPubRecordService.addOrUpdateBackblastPubRecordEntity(backblastPubRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入backblastPubRecord") |
| | | public R submit(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) { |
| | | return R.status(backblastPubRecordService.saveOrUpdate(backblastPubRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(backblastPubRecordService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| 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.backblast.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | 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.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO; |
| | | import org.springblade.modules.backblast.wrapper.BackblastWarnHanRecWrapper; |
| | | import org.springblade.modules.backblast.service.IBackblastWarnHanRecService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-backblastWarnHanRec/backblastWarnHanRec") |
| | | @Api(value = "反炸预警处置记录表", tags = "反炸预警处置记录表接口") |
| | | public class BackblastWarnHanRecController{ |
| | | |
| | | private final IBackblastWarnHanRecService backblastWarnHanRecService; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入backblastWarnHanRec") |
| | | public R detail(BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | BackblastWarnHanRecEntity detail = backblastWarnHanRecService.getOne(Condition.getQueryWrapper(backblastWarnHanRec)); |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 反炸预警处置记录表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec") |
| | | public R<IPage<BackblastWarnHanRecVO>> list(BackblastWarnHanRecEntity backblastWarnHanRec, Query query) { |
| | | IPage<BackblastWarnHanRecEntity> pages = backblastWarnHanRecService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastWarnHanRec)); |
| | | return R.data(BackblastWarnHanRecWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec") |
| | | public R<IPage<BackblastWarnHanRecVO>> page(BackblastWarnHanRecVO backblastWarnHanRec, Query query) { |
| | | IPage<BackblastWarnHanRecVO> pages = backblastWarnHanRecService.selectBackblastWarnHanRecPage(Condition.getPage(query), backblastWarnHanRec); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入backblastWarnHanRec") |
| | | public R save(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | return R.status(backblastWarnHanRecService.save(backblastWarnHanRec)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入backblastWarnHanRec") |
| | | public R update(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | return R.status(backblastWarnHanRecService.updateById(backblastWarnHanRec)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入backblastWarnHanRec") |
| | | public R submit(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | return R.status(backblastWarnHanRecService.saveOrUpdate(backblastWarnHanRec)); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(backblastWarnHanRecService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 自定义新增或修改 |
| | | */ |
| | | @PostMapping("/saveOrUpdate") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "自定义新增或修改", notes = "传入backblastWarnHanRec") |
| | | public R saveOrUpdate(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | return R.status(backblastWarnHanRecService.saveOrUpdateBackblastWarnHanRecEntity(backblastWarnHanRec)); |
| | | } |
| | | |
| | | |
| | | } |
| 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.backblast.dto; |
| | | |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class BackblastPubRecordDTO extends BackblastPubRecordEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| 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.backblast.dto; |
| | | |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class BackblastWarnHanRecDTO extends BackblastWarnHanRecEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.backblast.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_backblast_pub_record") |
| | | @ApiModel(value = "BackblastPubRecord对象", description = "反炸宣传记录表") |
| | | public class BackblastPubRecordEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主键id */ |
| | | @ApiModelProperty(value = "主键ID", example = "") |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 房屋编码 |
| | | */ |
| | | @ApiModelProperty(value = "房屋编码") |
| | | private Long houseCode; |
| | | /** |
| | | * 记录民警姓名 |
| | | */ |
| | | @ApiModelProperty(value = "宣传记录民警姓名") |
| | | private String policeman; |
| | | /** |
| | | * 记录民警电话 |
| | | */ |
| | | @ApiModelProperty(value = "宣传记录民警电话") |
| | | private String policemanPhone; |
| | | /** |
| | | * 宣传内容 |
| | | */ |
| | | @ApiModelProperty(value = "宣传内容") |
| | | private String pubContent; |
| | | /** |
| | | * 宣传现场照片 |
| | | */ |
| | | @ApiModelProperty(value = "宣传现场照片") |
| | | private String pubUrls; |
| | | |
| | | |
| | | /** 创建人 */ |
| | | @ApiModelProperty(value = "创建人", example = "") |
| | | @TableField("create_user") |
| | | private Long createUser; |
| | | |
| | | /** 创建时间 */ |
| | | @ApiModelProperty(value = "创建时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @ApiModelProperty(value = "更新人", example = "") |
| | | @TableField("update_user") |
| | | private Long updateUser; |
| | | |
| | | /** 更新时间 */ |
| | | @ApiModelProperty(value = "更新时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(value = "update_time",fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** 是否删除 0:否 1:是 */ |
| | | @ApiModelProperty(value = "是否删除 0:否 1:是", example = "") |
| | | @TableField("is_deleted") |
| | | private Integer isDeleted; |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.backblast.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_backblast_warn_han_rec") |
| | | @ApiModel(value = "BackblastWarnHanRec对象", description = "反炸预警处置记录表") |
| | | public class BackblastWarnHanRecEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主键id */ |
| | | @ApiModelProperty(value = "主键ID", example = "") |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 房屋编码 |
| | | */ |
| | | @ApiModelProperty(value = "房屋编码") |
| | | private Long houseCode; |
| | | /** |
| | | * 记录民警姓名 |
| | | */ |
| | | @ApiModelProperty(value = "记录民警姓名") |
| | | private String policeman; |
| | | /** |
| | | * 记录民警电话 |
| | | */ |
| | | @ApiModelProperty(value = "记录民警电话") |
| | | private String policemanPhone; |
| | | /** |
| | | * 记录内容 |
| | | */ |
| | | @ApiModelProperty(value = "记录内容") |
| | | private String recContent; |
| | | /** |
| | | * 现场照片 |
| | | */ |
| | | @ApiModelProperty(value = "现场照片") |
| | | private String sceUrls; |
| | | |
| | | /** 创建人 */ |
| | | @ApiModelProperty(value = "创建人", example = "") |
| | | @TableField("create_user") |
| | | private Long createUser; |
| | | |
| | | /** 创建时间 */ |
| | | @ApiModelProperty(value = "创建时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @ApiModelProperty(value = "更新人", example = "") |
| | | @TableField("update_user") |
| | | private Long updateUser; |
| | | |
| | | /** 更新时间 */ |
| | | @ApiModelProperty(value = "更新时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(value = "update_time",fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** 是否删除 0:否 1:是 */ |
| | | @ApiModelProperty(value = "是否删除 0:否 1:是", example = "") |
| | | @TableField("is_deleted") |
| | | private Integer isDeleted; |
| | | } |
| 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.backblast.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public interface BackblastPubRecordMapper extends BaseMapper<BackblastPubRecordEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param backblastPubRecord |
| | | * @return |
| | | */ |
| | | List<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage page, |
| | | @Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord, |
| | | @Param("isAdministrator") Integer isAdministrator, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("gridCodeList") List<String> gridCodeList); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.backblast.mapper.BackblastPubRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="backblastPubRecordResultMap" type="org.springblade.modules.backblast.vo.BackblastPubRecordVO"> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectBackblastPubRecordPage" resultMap="backblastPubRecordResultMap"> |
| | | select * from jczz_backblast_pub_record where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| 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.backblast.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public interface BackblastWarnHanRecMapper extends BaseMapper<BackblastWarnHanRecEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param backblastWarnHanRec |
| | | * @return |
| | | */ |
| | | List<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage page, |
| | | @Param("backblastWarnHanRec") BackblastWarnHanRecVO backblastWarnHanRec, |
| | | @Param("isAdministrator") Integer isAdministrator, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("gridCodeList") List<String> gridCodeList); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="backblastWarnHanRecResultMap" type="org.springblade.modules.backblast.vo.BackblastWarnHanRecVO"> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectBackblastWarnHanRecPage" resultMap="backblastWarnHanRecResultMap"> |
| | | select * from jczz_backblast_warn_han_rec where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| 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.backblast.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public interface IBackblastPubRecordService extends IService<BackblastPubRecordEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param backblastPubRecord |
| | | * @return |
| | | */ |
| | | IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord); |
| | | |
| | | |
| | | /** |
| | | * 反炸宣传记录表 自定义新增/修改 |
| | | * @param backblastPubRecord |
| | | * @return |
| | | */ |
| | | boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordEntity backblastPubRecord); |
| | | } |
| 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.backblast.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public interface IBackblastWarnHanRecService extends IService<BackblastWarnHanRecEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param backblastWarnHanRec |
| | | * @return |
| | | */ |
| | | IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec); |
| | | |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 自定义新增或修改 |
| | | * @param backblastWarnHanRec |
| | | * @return |
| | | */ |
| | | boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec); |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.backblast.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.modules.backblast.mapper.BackblastPubRecordMapper; |
| | | import org.springblade.modules.backblast.service.IBackblastPubRecordService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Service |
| | | public class BackblastPubRecordServiceImpl extends ServiceImpl<BackblastPubRecordMapper, BackblastPubRecordEntity> implements IBackblastPubRecordService { |
| | | |
| | | /** |
| | | * 自定义分页列表查询 |
| | | * @param page |
| | | * @param backblastPubRecord |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord) { |
| | | CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubRecordVO.class, backblastPubRecord); |
| | | return page.setRecords(baseMapper.selectBackblastPubRecordPage(page, |
| | | backblastPubRecord, |
| | | commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getGridCodeList())); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 自定义新增/修改 |
| | | * @param backblastPubRecord |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordEntity backblastPubRecord) { |
| | | // 设置民警姓名电话(非民警暂时也记录) |
| | | User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId()); |
| | | if (null!=user){ |
| | | backblastPubRecord.setPoliceman(user.getRealName()); |
| | | backblastPubRecord.setPolicemanPhone(user.getPhone()); |
| | | } |
| | | if (null!=backblastPubRecord.getId()){ |
| | | // 更新 |
| | | return updateById(backblastPubRecord); |
| | | } |
| | | // 新增 |
| | | return save(backblastPubRecord); |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.backblast.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO; |
| | | import org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper; |
| | | import org.springblade.modules.backblast.service.IBackblastWarnHanRecService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Service |
| | | public class BackblastWarnHanRecServiceImpl extends ServiceImpl<BackblastWarnHanRecMapper, BackblastWarnHanRecEntity> implements IBackblastWarnHanRecService { |
| | | |
| | | /** |
| | | * 自定义分页查询 |
| | | * @param page |
| | | * @param backblastWarnHanRec |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec) { |
| | | CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastWarnHanRecVO.class, backblastWarnHanRec); |
| | | return page.setRecords(baseMapper.selectBackblastWarnHanRecPage(page, |
| | | backblastWarnHanRec, |
| | | commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getGridCodeList())); |
| | | } |
| | | |
| | | /** |
| | | * 自定义新增/修改 |
| | | * @param backblastWarnHanRec |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | // 设置民警姓名电话(非民警暂时也记录) |
| | | User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId()); |
| | | if (null!=user){ |
| | | backblastWarnHanRec.setPoliceman(user.getRealName()); |
| | | backblastWarnHanRec.setPolicemanPhone(user.getPhone()); |
| | | } |
| | | if (null!=backblastWarnHanRec.getId()){ |
| | | // 更新 |
| | | return updateById(backblastWarnHanRec); |
| | | } |
| | | // 新增 |
| | | return save(backblastWarnHanRec); |
| | | } |
| | | } |
| 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.backblast.vo; |
| | | |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class BackblastPubRecordVO extends BackblastPubRecordEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| 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.backblast.vo; |
| | | |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class BackblastWarnHanRecVO extends BackblastWarnHanRecEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| 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.backblast.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 反炸宣传记录表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public class BackblastPubRecordWrapper extends BaseEntityWrapper<BackblastPubRecordEntity, BackblastPubRecordVO> { |
| | | |
| | | public static BackblastPubRecordWrapper build() { |
| | | return new BackblastPubRecordWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public BackblastPubRecordVO entityVO(BackblastPubRecordEntity backblastPubRecord) { |
| | | BackblastPubRecordVO backblastPubRecordVO = Objects.requireNonNull(BeanUtil.copy(backblastPubRecord, BackblastPubRecordVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(backblastPubRecord.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(backblastPubRecord.getUpdateUser()); |
| | | //backblastPubRecordVO.setCreateUserName(createUser.getName()); |
| | | //backblastPubRecordVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return backblastPubRecordVO; |
| | | } |
| | | |
| | | |
| | | } |
| 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.backblast.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity; |
| | | import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 反炸预警处置记录表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | | */ |
| | | public class BackblastWarnHanRecWrapper extends BaseEntityWrapper<BackblastWarnHanRecEntity, BackblastWarnHanRecVO> { |
| | | |
| | | public static BackblastWarnHanRecWrapper build() { |
| | | return new BackblastWarnHanRecWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public BackblastWarnHanRecVO entityVO(BackblastWarnHanRecEntity backblastWarnHanRec) { |
| | | BackblastWarnHanRecVO backblastWarnHanRecVO = Objects.requireNonNull(BeanUtil.copy(backblastWarnHanRec, BackblastWarnHanRecVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(backblastWarnHanRec.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(backblastWarnHanRec.getUpdateUser()); |
| | | //backblastWarnHanRecVO.setCreateUserName(createUser.getName()); |
| | | //backblastWarnHanRecVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return backblastWarnHanRecVO; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | jda.id,ifnull(jda.unit_name,"未知单元") unitName,jda.unit_code unitCode,jda.floor,jda.house_name as houseNo, |
| | | jda.address_code addressCode, |
| | | jh.name as realName,jh.relationship as roleType,1 as addressType, |
| | | juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id |
| | | juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id, |
| | | juhlh.color as houseColor |
| | | from jczz_doorplate_address jda |
| | | left join |
| | | ( |
| | |
| | | ) |
| | | ) jh |
| | | on jda.address_code = jh.house_code |
| | | left join jczz_user_house_label juhl on juhl.house_code = jda.address_code and lable_type=1 |
| | | left join jczz_user_house_label juhl on juhl.house_code = jda.address_code and juhl.lable_type=1 |
| | | left join jczz_user_house_label juhlh on juhlh.house_code = jda.address_code and juhlh.lable_type=2 |
| | | where 1=1 |
| | | and floor != '' |
| | | and house_name != '' |
| | |
| | | ( |
| | | select jda2.id,'' as unitName,address_code as unitCode,doorplate_name as floor,'' as houseNo,address_code as addressCode, |
| | | '' as realName,'' as roleType,2 as addressType, |
| | | juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id |
| | | juhl.id as cid,juhl.house_code,juhl.label_id,juhl.label_name,juhl.color,juhl.household_id, |
| | | juhlh.color as houseColor |
| | | from jczz_doorplate_address jda2 |
| | | left join jczz_user_house_label juhl on juhl.house_code = jda2.address_code and lable_type=1 |
| | | left join jczz_user_house_label juhl on juhl.house_code = jda2.address_code and juhl.lable_type=1 |
| | | left join jczz_user_house_label juhlh on juhlh.house_code = jda2.address_code and juhlh.lable_type=2 |
| | | where 1=1 |
| | | and building_code = #{houseParam.code} |
| | | and building_name != '' |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.param.CommonParamSet; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | } |
| | | if (roleName.equals("民警")) { |
| | | // 查询对应的社区编号 |
| | | communityList = policeAffairsGridService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | communityList = SysCache.getPoliceRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | } |
| | | } |
| | | // 查询街道 |
| | |
| | | }); |
| | | // 排序 |
| | | sortUnit(tempList, list); |
| | | // List<FuncNode> sortList = tempList.stream().sorted(Comparator.comparing(X -> X.getUnitName())).collect(Collectors.toList()); |
| | | // list.addAll(sortList); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } else if (funcNode.getUnitName().contains("六")) { |
| | | funcNode.setSort(6); |
| | | } else { |
| | | funcNode.setSort(1); |
| | | if (!containsNumber(funcNode.getUnitName())) { |
| | | funcNode.setSort(1); |
| | | }else { |
| | | funcNode.setSort(getNumber(funcNode.getUnitName())); |
| | | } |
| | | } |
| | | } |
| | | // 排序 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 判断是否包含数字 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean containsNumber(String str) { |
| | | Pattern pattern = Pattern.compile(".*\\d+.*"); |
| | | Matcher matcher = pattern.matcher(str); |
| | | return matcher.matches(); |
| | | } |
| | | |
| | | /** |
| | | * 取出字符串中的数字 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static int getNumber(String str){ |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (char c : str.toCharArray()) { |
| | | if (Character.isDigit(c)) { |
| | | sb.append(c); |
| | | } |
| | | } |
| | | return Integer.parseInt(sb.toString()); |
| | | } |
| | | |
| | | /** |
| | | * 查询房屋及出租详情信息 |
| | | * |
| | | * @param code 门牌地址编号 |
| | |
| | | private String roleType; |
| | | |
| | | /** |
| | | * 颜色(房屋标签对应的颜色) |
| | | */ |
| | | private String houseColor; |
| | | |
| | | /** |
| | | * 居住状态 |
| | | */ |
| | | private String residentialStatus; |
| | |
| | | * @return |
| | | */ |
| | | List<Region> getRegionChild(String regionCode); |
| | | |
| | | /** |
| | | * 获取民警下级区域 |
| | | * @param regionCode |
| | | * @return |
| | | */ |
| | | List<Region> getPoliceRegionChild(String regionCode); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取民警下级区域 |
| | | * @param regionCode |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Region> getPoliceRegionChild(String regionCode) { |
| | | // 创建区域对象 |
| | | List<Region> list = new ArrayList<>(); |
| | | // 查询公安相关的区域数据 |
| | | List<Region> regionList = baseMapper.getPoliceList(); |
| | | if (regionList.size()>0) { |
| | | List<Region> policeList = treeRegionList(regionList,regionCode, list); |
| | | list.addAll(policeList); |
| | | } |
| | | // 返回 |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取某个父节点下面的所有子节点 |
| | | * @param regionList |
| | | * @param parentCode |