101captain
2022-04-13 2c7d6db898705a26274d93b703156d1446edad3d
Merge branch 'huacheng' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng

 Conflicts:
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
16个文件已添加
4个文件已修改
912 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/reserve/EditDangerBatchDTO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/ComActReserveDangerAreaVO.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/DangerAreaStatics.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveDangerAreaApi.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveDangerAreaApi.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveDangerAreaDao.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActReserveDangerArea.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/Highlist.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/Middlelist.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ReturnData.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CodDataService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveDangerAreaService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CodDataServiceImpl.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveDangerAreaServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/JsoupUtil.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveDangerAreaMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/reserve/EditDangerBatchDTO.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.common.model.dtos.community.reserve;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * @author zzj
 */
@Data
@ApiModel("批量设置排查时间")
public class EditDangerBatchDTO {
    @ApiModelProperty("id数组")
    private List<Long> ids;
    @ApiModelProperty("排查时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date screenTime;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/ComActReserveDangerAreaVO.java
New file
@@ -0,0 +1,76 @@
package com.panzhihua.common.model.vos.community.reserve;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
 * (ComActReserveDangerArea)表实体类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:20
 */
@Data
@ApiModel("风险区列表实体")
public class ComActReserveDangerAreaVO implements Serializable {
    private static final long serialVersionUID = -25840459480337775L;
    private Long id;
    /**
     * 类型 1中风险 2高风险
     */
    @ApiModelProperty(value = "类型 1中风险 2高风险")
    private Integer type;
    /**
     * 省市区全称
     */
    @ApiModelProperty(value = "省市区全称")
    private String areaName;
    /**
     * 市
     */
    @ApiModelProperty(value = "市")
    private String county;
    /**
     * 省
     */
    @ApiModelProperty(value = "省")
    private String province;
    /**
     * 区
     */
    @ApiModelProperty(value = "区")
    private String city;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    /**
     * 筛查时间
     */
    @ApiModelProperty(value = "筛查时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date screenTime;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/DangerAreaStatics.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.common.model.vos.community.reserve;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("风险区数据统计")
public class DangerAreaStatics {
    @ApiModelProperty("中风险区")
    private Integer middleCount;
    @ApiModelProperty("高风险区")
    private Integer highCount;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
@@ -90,7 +90,8 @@
    @ApiModelProperty("政策分类: 1-社工人才政策 2-社会组织培育政策 3-其他政策")
    private Integer policyType;
    @ApiModelProperty(value = "查询筛选:0-本小区 1-全部")
    private Integer choice;
    @ApiModelProperty("排序方式 正序 ASC")
    private String sort;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -6,6 +6,7 @@
import com.panzhihua.common.model.dtos.civil.*;
import com.panzhihua.common.model.dtos.common.*;
import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO;
import com.panzhihua.common.model.dtos.community.reserve.*;
import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO;
import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO;
import com.panzhihua.common.model.dtos.community.*;
@@ -29,6 +30,7 @@
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoMemberVO;
import com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO;
import com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO;
import com.panzhihua.common.model.vos.community.social.*;
import io.swagger.annotations.ApiOperation;
import com.panzhihua.common.model.vos.community.*;
@@ -236,18 +238,6 @@
import com.panzhihua.common.model.dtos.community.rentingHouses.ReleaseOrCancelHouseDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHouseRegisterDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.RentingHousesConfigDTO;
import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO;
import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO;
import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO;
import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveInfoDTO;
import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveStatusDTO;
import com.panzhihua.common.model.dtos.community.reserve.EditReserveAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.MakeHandleAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO;
import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO;
import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO;
@@ -9605,4 +9595,55 @@
    @PostMapping("/comActAcidRecord/export")
    R exportComActAcidRecord(@RequestBody ComActAcidRecordDTO comActAcidRecordDTO);
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("/comActReserveDangerArea/queryAll")
    R selectAllComActReserveDangerArea(@RequestBody CommonPage commonPage);
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/comActReserveDangerArea/{id}")
    R selectOneComActReserveDangerArea(@PathVariable("id") Long id);
    /**
     * 修改数据
     *
     * @param comActReserveDangerAreaVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/comActReserveDangerArea/update")
    R updateComActReserveDangerArea(@RequestBody ComActReserveDangerAreaVO comActReserveDangerAreaVO);
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("/comActReserveDangerArea/del")
    R deleteComActReserveDangerArea(@RequestParam("id") Long id);
    /**
     * 风险区数据统计
     * @return
     */
    @GetMapping("/comActReserveDangerArea/statics")
    R staticsComActReserveDangerArea();
    /**
     * 批量设置起始时间
     * @param editDangerBatchDTO
     * @return
     */
    @PostMapping("/comActReserveDangerArea/updateBatch")
    R updateBatchComActReserveDangerArea(@RequestBody EditDangerBatchDTO editDangerBatchDTO);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveDangerAreaApi.java
New file
@@ -0,0 +1,105 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.model.dtos.community.reserve.EditDangerBatchDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO;
import com.panzhihua.common.model.vos.community.reserve.DangerAreaStatics;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * (ComActReserveDangerArea)表控制层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:21
 */
@Slf4j
@Api(tags = {"风险区"})
@RestController
@RequestMapping("comActReserveDangerArea")
public class ComActReserveDangerAreaApi {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @ApiOperation(value = "分页查询",response = ComActReserveDangerAreaVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return communityService.selectAllComActReserveDangerArea(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "通过主键查询单条数据",response = ComActReserveDangerAreaVO.class)
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return this.communityService.selectOneComActReserveDangerArea(id);
    }
    /**
     * 修改数据
     *
     * @param comActReserveDangerAreaVO 实体对象
     * @return 修改结果
     */
    @ApiOperation(value = "修改数据")
    @PostMapping("/update")
    public R update(@RequestBody ComActReserveDangerAreaVO comActReserveDangerAreaVO) {
        return this.communityService.updateComActReserveDangerArea(comActReserveDangerAreaVO);
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @ApiOperation(value = "删除数据")
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return this.communityService.deleteComActReserveDangerArea(id);
    }
    /**
     * 风险区数据统计
     * @return
     */
    @ApiOperation(value = "风险区数据统计",response = DangerAreaStatics.class)
    @GetMapping("/statics")
    public R statics(){
        return this.communityService.staticsComActReserveDangerArea();
    }
    /**
     * 批量设置起始时间
     * @param editDangerBatchDTO
     * @return
     */
    @ApiOperation(value = "批量设置起始时间")
    @PostMapping("/updateBatch")
    public R updateBatch(@RequestBody EditDangerBatchDTO editDangerBatchDTO){
        return this.communityService.updateBatchComActReserveDangerArea(editDangerBatchDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/pom.xml
@@ -55,6 +55,12 @@
            <groupId>com.netflix.hystrix</groupId>
            <artifactId>hystrix-javanica</artifactId>
        </dependency>
        <!--jsoup爬虫爬取网页 -->
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.13.1</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveDangerAreaApi.java
New file
@@ -0,0 +1,101 @@
package com.panzhihua.service_community.api;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.panzhihua.common.model.dtos.community.reserve.EditDangerBatchDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO;
import com.panzhihua.service_community.entity.ComActReserveDangerArea;
import com.panzhihua.service_community.service.ComActReserveDangerAreaService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
 * (ComActReserveDangerArea)表控制层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:21
 */
@RestController
@RequestMapping("comActReserveDangerArea")
public class ComActReserveDangerAreaApi {
    /**
     * 服务对象
     */
    @Resource
    private ComActReserveDangerAreaService comActReserveDangerAreaService;
    /**
     * 分页查询所有数据
     *
     * @param commonPage 查询实体
     * @return 所有数据
     */
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        return this.comActReserveDangerAreaService.pageList(commonPage);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public R selectOne(@PathVariable("id") Long id) {
        return R.ok(this.comActReserveDangerAreaService.getById(id));
    }
    /**
     * 修改数据
     *
     * @param comActReserveDangerAreaVO 实体对象
     * @return 修改结果
     */
    @PostMapping("/update")
    public R update(@RequestBody ComActReserveDangerAreaVO comActReserveDangerAreaVO) {
        ComActReserveDangerArea comActReserveDangerArea=new ComActReserveDangerArea();
        BeanUtils.copyProperties(comActReserveDangerAreaVO,comActReserveDangerArea);
        return R.ok(this.comActReserveDangerAreaService.updateById(comActReserveDangerArea));
    }
    /**
     * 删除数据
     *
     * @param id 主键结合
     * @return 删除结果
     */
    @GetMapping("del")
    public R delete(@RequestParam("id") Long id) {
        return R.ok(this.comActReserveDangerAreaService.removeById(id));
    }
    /**
     * 风险区数据统计
     * @return
     */
    @GetMapping("/statics")
    public R statics(){
        return this.comActReserveDangerAreaService.statics();
    }
    /**
     * 批量设置起始时间
     * @param editDangerBatchDTO
     * @return
     */
    @PostMapping("/updateBatch")
    public R updateBatch(@RequestBody EditDangerBatchDTO editDangerBatchDTO){
        return this.comActReserveDangerAreaService.updateBatch(editDangerBatchDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveDangerAreaDao.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO;
import com.panzhihua.common.model.vos.community.reserve.DangerAreaStatics;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.ComActReserveDangerArea;
import org.apache.ibatis.annotations.Param;
/**
 * (ComActReserveDangerArea)表数据库访问层
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:20
 */
@Mapper
public interface ComActReserveDangerAreaDao extends BaseMapper<ComActReserveDangerArea> {
    /**
     * 分页查询风险区列表
     * @param page
     * @param commonPage
     * @return
     */
    IPage<ComActReserveDangerAreaVO> pageList(Page page, @Param("commonPage")CommonPage commonPage);
    /**
     * 风险区统计
     * @return
     */
    DangerAreaStatics statics();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActReserveDangerArea.java
New file
@@ -0,0 +1,82 @@
package com.panzhihua.service_community.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
 * (ComActReserveDangerArea)表实体类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:20
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("")
public class ComActReserveDangerArea implements Serializable {
    private static final long serialVersionUID = -25840459480337775L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 类型 1中风险 2高风险
     */
    @ApiModelProperty(value = "类型 1中风险 2高风险")
    private Integer type;
    /**
     * 省市区全称
     */
    @ApiModelProperty(value = "省市区全称")
    private String areaName;
    /**
     * 市
     */
    @ApiModelProperty(value = "市")
    private String county;
    /**
     * 省
     */
    @ApiModelProperty(value = "省")
    private String province;
    /**
     * 区
     */
    @ApiModelProperty(value = "区")
    private String city;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 筛查时间
     */
    @ApiModelProperty(value = "筛查时间")
    private Date screenTime;
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/Highlist.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.model.dos;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
public class Highlist {
    private String type;
    private String province;
    private String city;
    private String county;
    private String area_name;
    private List<String> communitys;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/Middlelist.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.model.dos;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
public class Middlelist {
    private String type;
    private String province;
    private String city;
    private String county;
    private String area_name;
    private List<String> communitys;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ReturnData.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.service_community.model.dos;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
public class ReturnData {
    private String end_update_time;
    private int hcount;
    private int mcount;
    private List<Highlist> highlist;
    private List<Middlelist> middlelist;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CodDataService.java
New file
@@ -0,0 +1,12 @@
package com.panzhihua.service_community.service;
/**
 * 国务院防疫数据服务层
 * @author zzj
 */
public interface CodDataService {
    /**
     * 获取风险区数据
     */
    public void getCodData();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveDangerAreaService.java
New file
@@ -0,0 +1,38 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.dtos.community.reserve.EditDangerBatchDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.ComActReserveDangerArea;
/**
 * (ComActReserveDangerArea)表服务接口
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:20
 */
public interface ComActReserveDangerAreaService extends IService<ComActReserveDangerArea> {
    /**
     * 分页查询
     *
     * @param commonPage
     * @return
     */
    R pageList(CommonPage commonPage);
    /**
     * 中高分线统计数据
     * @return
     */
    R statics();
    /**
     * 批量设置起始时间
     * @param editDangerBatchDTO
     * @return
     */
    R updateBatch(EditDangerBatchDTO editDangerBatchDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CodDataServiceImpl.java
New file
@@ -0,0 +1,107 @@
package com.panzhihua.service_community.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.Highlist;
import com.panzhihua.service_community.model.dos.Middlelist;
import com.panzhihua.service_community.model.dos.ReturnData;
import com.panzhihua.service_community.service.CodDataService;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @title: BigScreenStatisticsServiceImpl
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 国务院防疫数据服务实现类
 * @author: zzj
 * @date: 2022/4/1 9:56
 */
@Service
public class CodDataServiceImpl implements CodDataService {
    @Override
    public void getCodData() {
        //获取时间戳
        long timestamp = LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"));
        String url = "http://103.66.32.242:8005/zwfwMovePortal/interface/interfaceJson";
        //以下常量值都是从网页源代码上获取到的------start
        final String STATE_COUNCIL_SIGNATURE_KEY = "fTN2pfuisxTavbTuYVSsNJHetwq5bJvCQkjjtiLM2dCratiA";
        final String STATE_COUNCIL_X_WIF_NONCE = "QkjjtiLM2dCratiA";
        final String STATE_COUNCIL_X_WIF_PAASID = "smt-application";
        //国务院疫情防控查询 appId
        final String STATE_COUNCIL_APP_ID = "NcApplication";
        //国务院疫情防控查询 PASSID
        final String STATE_COUNCIL_PASSID = "zdww";
        //国务院疫情防控查询 秘钥
        final String STATE_COUNCIL_NONCE = "123456789abcdefg";
        //国务院疫情防控查询 token
        final String STATE_COUNCIL_TOEKN = "23y0ufFl5YxIyGrI8hWRUZmKkvtSjLQA";
        //国务院疫情防控查询 key
        final String STATE_COUNCIL_KEY = "3C502C97ABDA40D0A60FBEE50FAAD1DA";
        //以下常量值都是从网页源代码上获取到的------end
        HttpHeaders requestHeaders = new HttpHeaders();
        Map<String,Object> body = new HashMap<>(10);
        //计算签名要用的字符串
        String signatureStr = String.format("%d%s%d",timestamp, STATE_COUNCIL_SIGNATURE_KEY,timestamp);
        //计算签名
        String signature = getSHA256StrJava(signatureStr).toUpperCase();
        //请求头参数封装
        requestHeaders.add( "x-wif-nonce",STATE_COUNCIL_X_WIF_NONCE);
        requestHeaders.add( "x-wif-paasid",STATE_COUNCIL_X_WIF_PAASID);
        requestHeaders.add( "x-wif-signature",signature);
        requestHeaders.add( "x-wif-timestamp",String.valueOf(timestamp));
        //body参数封装
        body.put("appId",STATE_COUNCIL_APP_ID);
        body.put("paasHeader",STATE_COUNCIL_PASSID);
        body.put("timestampHeader",timestamp);
        body.put("nonceHeader",STATE_COUNCIL_NONCE);
        //请求参数
        signatureStr = String.format("%d%s%s%d",timestamp,STATE_COUNCIL_TOEKN,STATE_COUNCIL_NONCE,timestamp);
        String signatureHeader = getSHA256StrJava(signatureStr).toUpperCase();
        body.put("signatureHeader",signatureHeader);
        body.put("key",STATE_COUNCIL_KEY);
        HttpEntity<String> httpEntity = new HttpEntity(body, requestHeaders);
        ResponseEntity<String> response = new RestTemplate().exchange(url, HttpMethod.POST,httpEntity,String.class);
        R r=JSONObject.parseObject(response.getBody(),R.class);
        ReturnData returnData=JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ReturnData.class);
        List<Highlist> highlist=returnData.getHighlist();
        List<Middlelist> middlelist=returnData.getMiddlelist();
    }
    public static String getSHA256StrJava(String str) {
        MessageDigest messageDigest;
        String encodeStr = "";
        try {
            messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.update(str.getBytes(StandardCharsets.UTF_8));
            byte[] bytes = messageDigest.digest();
            StringBuffer stringBuffer = new StringBuffer();
            String temp = null;
            for (int i = 0; i < bytes.length; i++) {
                temp = Integer.toHexString(bytes[i] & 0xFF);
                if (temp.length() == 1) {
                    //1得到一位的进行补0操作
                    stringBuffer.append("0");
                }
                stringBuffer.append(temp);
            }
            encodeStr = stringBuffer.toString();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return encodeStr;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveDangerAreaServiceImpl.java
New file
@@ -0,0 +1,46 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.community.reserve.EditDangerBatchDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.ComActReserveDangerArea;
import com.panzhihua.service_community.dao.ComActReserveDangerAreaDao;
import com.panzhihua.service_community.service.ComActReserveDangerAreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * (ComActReserveDangerArea)表服务实现类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 相关功能
 *
 * @author zzj
 * @since 2022-04-07 14:22:21
 */
@Slf4j
@Service
public class ComActReserveDangerAreaServiceImpl extends ServiceImpl<ComActReserveDangerAreaDao, ComActReserveDangerArea> implements ComActReserveDangerAreaService {
    @Override
    public R pageList(CommonPage commonPage) {
        return R.ok(this.baseMapper.pageList(new Page(commonPage.getPage(), commonPage.getSize()),commonPage));
    }
    @Override
    public R statics() {
        return R.ok(this.baseMapper.statics());
    }
    @Override
    public R updateBatch(EditDangerBatchDTO editDangerBatchDTO) {
        editDangerBatchDTO.getIds().forEach(id ->{
            ComActReserveDangerArea comActReserveDangerArea=new ComActReserveDangerArea();
            comActReserveDangerArea.setId(id);
            comActReserveDangerArea.setScreenTime(editDangerBatchDTO.getScreenTime());
            this.baseMapper.updateById(comActReserveDangerArea);
        });
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/JsoupUtil.java
New file
@@ -0,0 +1,101 @@
package com.panzhihua.service_community.util;
import com.alibaba.fastjson.JSONObject;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @author zzj
 */
@Component
public class JsoupUtil {
    public static String getSHA256StrJava(String str) {
        MessageDigest messageDigest;
        String encodeStr = "";
        try {
            messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.update(str.getBytes(StandardCharsets.UTF_8));
            byte[] bytes = messageDigest.digest();
            StringBuffer stringBuffer = new StringBuffer();
            String temp = null;
            for (int i = 0; i < bytes.length; i++) {
                temp = Integer.toHexString(bytes[i] & 0xFF);
                if (temp.length() == 1) {
                    //1得到一位的进行补0操作
                    stringBuffer.append("0");
                }
                stringBuffer.append(temp);
            }
            encodeStr = stringBuffer.toString();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return encodeStr;
    }
    public  void test() {
        //获取时间戳
        long timestamp = LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"));
        String url = "http://103.66.32.242:8005/zwfwMovePortal/interface/interfaceJson";
        //以下常量值都是从网页源代码上获取到的------start
        final String STATE_COUNCIL_SIGNATURE_KEY = "fTN2pfuisxTavbTuYVSsNJHetwq5bJvCQkjjtiLM2dCratiA";
        final String STATE_COUNCIL_X_WIF_NONCE = "QkjjtiLM2dCratiA";
        final String STATE_COUNCIL_X_WIF_PAASID = "smt-application";
        //国务院疫情防控查询 appId
        final String STATE_COUNCIL_APP_ID = "NcApplication";
        //国务院疫情防控查询 PASSID
        final String STATE_COUNCIL_PASSID = "zdww";
        //国务院疫情防控查询 秘钥
        final String STATE_COUNCIL_NONCE = "123456789abcdefg";
        //国务院疫情防控查询 token
        final String STATE_COUNCIL_TOEKN = "23y0ufFl5YxIyGrI8hWRUZmKkvtSjLQA";
        //国务院疫情防控查询 key
        final String STATE_COUNCIL_KEY = "3C502C97ABDA40D0A60FBEE50FAAD1DA";
        //以下常量值都是从网页源代码上获取到的------end
        HttpHeaders requestHeaders = new HttpHeaders();
        Map<String,Object> body = new HashMap<>(10);
        //计算签名要用的字符串
        String signatureStr = String.format("%d%s%d",timestamp, STATE_COUNCIL_SIGNATURE_KEY,timestamp);
        //计算签名
        String signature = getSHA256StrJava(signatureStr).toUpperCase();
        //请求头参数封装
        requestHeaders.add( "x-wif-nonce",STATE_COUNCIL_X_WIF_NONCE);
        requestHeaders.add( "x-wif-paasid",STATE_COUNCIL_X_WIF_PAASID);
        requestHeaders.add( "x-wif-signature",signature);
        requestHeaders.add( "x-wif-timestamp",String.valueOf(timestamp));
        //body参数封装
        body.put("appId",STATE_COUNCIL_APP_ID);
        body.put("paasHeader",STATE_COUNCIL_PASSID);
        body.put("timestampHeader",timestamp);
        body.put("nonceHeader",STATE_COUNCIL_NONCE);
        //请求参数
        signatureStr = String.format("%d%s%s%d",timestamp,STATE_COUNCIL_TOEKN,STATE_COUNCIL_NONCE,timestamp);
        String signatureHeader = getSHA256StrJava(signatureStr).toUpperCase();
        body.put("signatureHeader",signatureHeader);
        body.put("key",STATE_COUNCIL_KEY);
        HttpEntity<String> httpEntity = new HttpEntity(body, requestHeaders);
        ResponseEntity<String> response = new RestTemplate().exchange(url, HttpMethod.POST,httpEntity,String.class);
        System.out.println(JSONObject.toJSONString(JSONObject.parseObject(response.getBody()),true));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveDangerAreaMapper.xml
New file
@@ -0,0 +1,38 @@
<?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="com.panzhihua.service_community.dao.ComActReserveDangerAreaDao">
    <resultMap type="com.panzhihua.service_community.entity.ComActReserveDangerArea"
               id="ComActReserveDangerAreaBaseResultMap">
        <result property="id" column="id"/>
        <result property="type" column="type"/>
        <result property="areaName" column="area_name"/>
        <result property="county" column="county"/>
        <result property="province" column="province"/>
        <result property="city" column="city"/>
        <result property="createTime" column="create_time"/>
        <result property="screenTime" column="screen_time"/>
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO">
        select * from com_act_reserve_danger_area
        <where>
            status = 1
            <if test="commonPage.type !=null">
                <if test="commonPage.type == 0">
                    and screen_time is null
                </if>
                <if test="commonPage.type == 1">
                    and screen_time is not null
                </if>
            </if>
            <if test="commonPage.address !=null and commonPage.address !=''">
                and (area_name like concat('%',#{commonPage.address},'%') or country like concat('%',#{commonPage.address},'%') or province like concat('%',#{commonPage.address},'%') or city like concat('%',#{commonPage.address},'%'))
            </if>
        </where>
    </select>
    <select id="statics" resultType="com.panzhihua.common.model.vos.community.reserve.DangerAreaStatics">
        select (select count(*) from com_act_reserve_danger_area where status = 1 and type = 1) middleCount,(select count(*) from com_act_reserve_danger_area where status = 1 and type = 2) highCount
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
@@ -34,8 +34,9 @@
        + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n"
        + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id  left join com_act t on d.community_id = t.community_id\n"
        + "where d.type=#{partyBuildingComPbDynVO.type}  \n"
            + "<if test='partyBuildingComPbDynVO.choice == 0 '>"
        + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>"
        + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "
            + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "+" </if> "
        + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>"
        + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>"