101captain
2022-05-16 8fc64650de538d2aba77a88c707e574b570c0c07
花城E+防疫修改
5个文件已修改
87 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java
@@ -59,6 +59,17 @@
    }
    /**
     * 分页查询所有数据
     *
     * @param comActAcidRecordDTO 查询实体
     * @return 所有数据
     */
    @PostMapping("exportNew")
    public R exportNew(@RequestBody ComActAcidRecordDTO comActAcidRecordDTO) {
        return this.comActAcidRecordService.exportNew(comActAcidRecordDTO);
    }
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java
@@ -39,6 +39,13 @@
    List<ComActAcidRecordExcelReturn> export(@Param("commonPage")ComActAcidRecordDTO comActAcidRecordDTO);
    /**
     * 导出
     * @param comActAcidRecordDTO
     * @return
     */
    List<ComActAcidRecordExcelReturn> exportNew(@Param("commonPage")ComActAcidRecordDTO comActAcidRecordDTO);
    /**
     * 5项统计
     * @param localCity
     * @return
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java
@@ -32,6 +32,13 @@
    R export(ComActAcidRecordDTO comActAcidRecordDTO);
    /**
     * 导出
     * @param comActAcidRecordDTO
     * @return
     */
    R exportNew(ComActAcidRecordDTO comActAcidRecordDTO);
    /**
     * 新增信息
     * @param comActAcidRecordVO
     * @return
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
@@ -86,6 +86,31 @@
    }
    @Override
    public R exportNew(ComActAcidRecordDTO comActAcidRecordDTO) {
        List<ComActAcidRecordExcelReturn> comActAcidRecordExcelVOS=this.baseMapper.exportNew(comActAcidRecordDTO);
        comActAcidRecordExcelVOS.forEach(comActAcidRecordExcelVO -> {
            if(StringUtils.isNotEmpty(comActAcidRecordExcelVO.getTouristCity())&&comActAcidRecordExcelVO.getTouristCity().contains("[")){
                JSONArray jsonArray = JSON.parseArray(comActAcidRecordExcelVO.getTouristCity());
                if(jsonArray.isEmpty()){
                    comActAcidRecordExcelVO.setTouristCity("");
                }
                else {
                    StringBuilder touristCity= new StringBuilder();
                    for(int i=0;i<jsonArray.size();i++){
                        JSONObject jsonObject=jsonArray.getJSONObject(i);
                        String name=jsonObject.getString("name");
                        if(StringUtils.isNotEmpty(name)){
                            touristCity.append(name).append(";");
                        }
                    }
                    comActAcidRecordExcelVO.setTouristCity(touristCity.toString());
                }
            }
        });
        return R.ok(comActAcidRecordExcelVOS);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R insertRecord(ComActAcidRecordVO comActAcidRecordVO) {
        Integer count= this.baseMapper.selectCount(new QueryWrapper<ComActAcidRecord>().lambda().eq(ComActAcidRecord::getIdCard,comActAcidRecordVO.getIdCard()).ge(ComActAcidRecord::getCreateTime, DateUtils.getCurrentDate(DateUtils.yyyyMMdd_format)));
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml
@@ -70,6 +70,43 @@
                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 t.create_time between #{commonPage.startTime}  and #{commonPage.stopTime}
            </if>
            <if test="commonPage.isAddress !=null">
                <if test="commonPage.isAddress == 0">
                    and (local_city is null OR LENGTH(TRIM(local_city)) = 0)
                </if>
                <if test="commonPage.isAddress == 1">
                    and local_city is not null AND LENGTH(TRIM(local_city)) > 0
                </if>
            </if>
            <if test="commonPage.departureCity !=null and commonPage.departureCity !=''">
                and departure_city like concat('%',#{commonPage.departureCity},'%')
            </if>
            <if test="commonPage.localCity !=null and commonPage.localCity !='' and commonPage.localCity !='panzhihua'">
                and local_city like concat('%',#{commonPage.localCity},'%')
            </if>
            <if test="commonPage.colorMark !=null and commonPage.colorMark !=''">
                and color_mark like concat('%',#{commonPage.colorMark},'%')
            </if>
            <if test="commonPage.travelCard !=null and commonPage.travelCard !=''">
                and travel_card like concat('%',#{commonPage.travelCard},'%')
            </if>
        </where>
        order by t.create_time desc
    </select>
    <select id="exportNew" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn">
        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>
            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 t.user_id = #{commonPage.userId}
            </if>
            <if test="commonPage.keyword !=null and 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 t.create_time between #{commonPage.startTime}  and concat(#{commonPage.stopTime},' 23:59:59')
            </if>
            <if test="commonPage.isAddress !=null">