linwe
2024-08-07 06df33f156924c564c17b11fdb96c5bb298a810d
三色任务和自查任务
26 files modified
1 files added
364 ■■■■ changed files
src/main/java/org/springblade/modules/customTask/entity/CustomTaskEntity.java 13 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/customTask/mapper/CustomTaskMapper.xml 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml 38 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java 7 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml 30 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/controller/PlaceController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/IPlaceService.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlaceVO.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml 7 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/SelfExaminationTaskHandler.java 13 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/VisitingTaskHandler.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskVO.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/jobhandler/SynchronizationEhjb.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/customTask/entity/CustomTaskEntity.java
@@ -16,10 +16,7 @@
 */
package org.springblade.modules.customTask.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@@ -95,13 +92,13 @@
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 创建人 */
@@ -125,4 +122,8 @@
    @ApiModelProperty(value = "任务id", example = "")
    @TableField("job_id")
    private Integer jobId;
    @ApiModelProperty(value = "任务范围", example = "")
    @TableField("task_range")
    private String taskRange;
}
src/main/java/org/springblade/modules/customTask/mapper/CustomTaskMapper.xml
@@ -46,6 +46,7 @@
        <result property="updateBy"    column="update_by"    />
        <result property="cron"    column="cron"    />
        <result property="taskStatus"    column="task_status"    />
        <result property="taskRange"    column="task_range"    />
        <result property="jobId"    column="job_id"    />
    </resultMap>
@@ -56,13 +57,18 @@
            task_type,
            label_id,
            label_color,
            category_id,
            place_label,
            place_small_label,
            nineType,
            delete_flag,
            update_time,
            create_time,
            create_by,
            update_by
            update_by,
            cron,
            task_range,
            task_status,
            job_id
        from
            jczz_custom_task
    </sql>
@@ -81,13 +87,18 @@
            <if test="taskType != null  and taskType != ''"> and task_type = #{taskType}</if>
            <if test="labelId != null "> and label_id = #{labelId}</if>
            <if test="labelColor != null  and labelColor != ''"> and label_color = #{labelColor}</if>
            <if test="categoryId != null "> and category_id = #{categoryId}</if>
            <if test="placeLabel != null "> and place_label = #{placeLabel}</if>
            <if test="placeSmallLabel != null  and placeSmallLabel != ''"> and place_small_label = #{placeSmallLabel}</if>
            <if test="nineType != null "> and nineType = #{nineType}</if>
            <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="createBy != null "> and create_by = #{createBy}</if>
            <if test="updateBy != null "> and update_by = #{updateBy}</if>
            <if test="cron != null  and cron != ''"> and cron = #{cron}</if>
            <if test="taskRange != null  and taskRange != ''"> and task_range = #{taskRange}</if>
            <if test="taskStatus != null  and taskStatus != ''"> and task_status = #{taskStatus}</if>
            <if test="jobId != null "> and job_id = #{jobId}</if>
        </where>
    </select>
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
@@ -144,6 +144,7 @@
                    setGridInfo(record);
                    addList.add(record);
                } else {
                    setGridInfo(record);
                    updateList.add(record);
                }
            });
src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java
@@ -60,8 +60,8 @@
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gridWorkLog")
    public R<GridWorkLogVO> detail(GridWorkLogEntity gridWorkLog) {
        GridWorkLogEntity detail = gridWorkLogService.getOne(Condition.getQueryWrapper(gridWorkLog));
        return R.data(GridWorkLogWrapper.build().entityVO(detail));
        GridWorkLogVO detail = gridWorkLogService.getDetail(gridWorkLog);
        return R.data(detail);
    }
    /**
     * 网格工作日志表 分页
src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java
@@ -51,4 +51,11 @@
     * @return
     */
    Integer getGridWorkCountHandleCount(@Param("gridCode") String gridCode,@Param("status")  Integer status);
    /**
     * 获取详情
     * @param gridWorkLog
     * @return
     */
    GridWorkLogVO getDetail(GridWorkLogEntity gridWorkLog);
}
src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
@@ -116,11 +116,47 @@
        left join jczz_house jhs on jhs.house_code=jh.house_code and jhs.is_deleted = 0
        where jgwl.is_deleted = 0
        <if test="status!=null">
            and jgwl.status = #{status}
            and (jgwl.status = #{status} or jgwl.status = 4)
        </if>
        <if test="gridCode!=null and gridCode!=''">
            and jhs.grid_code = #{gridCode}
        </if>
    </select>
    <select id="getDetail" resultType="org.springblade.modules.grid.vo.GridWorkLogVO">
        SELECT
        jgwl.id,
        jgwl.type,
        jgwl.person_type,
        jgwl.household_id,
        jgwl.context,
        jgwl.url,
        jgwl.work_time,
        jgwl.source,
        jgwl.status,
        jgwl.create_time,
        jgwl.create_user,
        jgwl.is_deleted,
        jl.label_name
        FROM
        jczz_grid_work_log jgwl
        LEFT JOIN jczz_label jl ON jgwl.person_type = jl.id
        <where>
            <if test="id != null ">and jgwl.id = #{id}</if>
            <if test="type != null ">and jgwl.type = #{type}</if>
            <if test="personType != null ">and jgwl.person_type = #{personType}</if>
            <if test="householdId != null ">and jgwl.household_id = #{householdId}</if>
            <if test="context != null  and context != ''">and jgwl.context = #{context}</if>
            <if test="url != null  and url != ''">and jgwl.url = #{url}</if>
            <if test="workTime != null ">and jgwl.work_time = #{workTime}</if>
            <if test="source != null ">and jgwl.source = #{source}</if>
            <if test="status != null ">and jgwl.status = #{status}</if>
            <if test="createTime != null ">and jgwl.create_time = #{createTime}</if>
            <if test="createUser != null ">and jgwl.create_user = #{createUser}</if>
            <if test="isDeleted != null ">and jgwl.is_deleted = #{isDeleted}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java
@@ -47,4 +47,11 @@
     * @return
     */
    Integer getGridWorkCountHandleCount(String gridCode, Integer status);
    /**
     *
     * @param gridWorkLog
     * @return
     */
    GridWorkLogVO getDetail(GridWorkLogEntity gridWorkLog);
}
src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java
@@ -50,7 +50,7 @@
    @Override
    public IPage<GridWorkLogVO> selectGridWorkLogPage(IPage<GridWorkLogVO> page, GridWorkLogVO gridWorkLog) {
        CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(GridWorkLogVO.class,gridWorkLog);
        if (!Strings.isBlank(gridWorkLog.getRoleName()) && gridWorkLog.getRoleName().equals("网格员")){
        if (!Strings.isBlank(gridWorkLog.getRoleName()) && gridWorkLog.getRoleName().equals("wgy")){
            gridWorkLog.setGridId(getGridId());
        }
        return page.setRecords(baseMapper.selectGridWorkLogPage(page,
@@ -83,4 +83,9 @@
    public Integer getGridWorkCountHandleCount(String gridCode, Integer status) {
        return baseMapper.getGridWorkCountHandleCount(gridCode,status);
    }
    @Override
    public GridWorkLogVO getDetail(GridWorkLogEntity gridWorkLog) {
        return baseMapper.getDetail(gridWorkLog);
    }
}
src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java
@@ -96,4 +96,7 @@
     */
    private String communityCode;
    @ApiModelProperty(value = "标签名称")
    private String labelName;
}
src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
@@ -87,4 +87,6 @@
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    private String taskRange;
}
src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
@@ -22,6 +22,7 @@
import org.springblade.modules.house.dto.UserHouseLabelDTO;
import org.springblade.modules.house.entity.UserHouseLabelEntity;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.modules.house.vo.UserHouseLabelVO;
import java.util.List;
@@ -72,4 +73,11 @@
    List<UserHouseLabelEntity> getLabelList(@Param("labelNames") String labelName);
    List<HouseholdLabelVO> followStatisticalLabels(IPage page, @Param("householdLabel") HouseholdLabelVO householdLabel);
    /**
     *
     * @param userHouseLabelVO
     * @return
     */
    List<UserHouseLabelEntity> getUserHouseLabelList(@Param("userHouseLabelVO")  UserHouseLabelVO userHouseLabelVO);
}
src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
@@ -813,7 +813,7 @@
                        LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
                WHERE
                    juhl.lable_type = 1
                  AND jl.id = '1033'
                  AND jl.id = '1025'
                  AND juhl.household_id IS NOT NULL
                  AND juhl.house_code IN (
                    SELECT
@@ -832,7 +832,7 @@
                        LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
                WHERE
                    juhl.lable_type = 1
                  AND jl.id = '15'
                  AND jl.id = '23'
                  AND juhl.household_id IS NOT NULL
                  AND juhl.house_code IN (
                    SELECT
@@ -852,5 +852,31 @@
    </select>
    <select id="getUserHouseLabelList" resultType="org.springblade.modules.house.entity.UserHouseLabelEntity">
        SELECT
        juhl.id,
        juhl.house_code,
        juhl.label_id,
        juhl.label_name,
        juhl.color,
        juhl.remark,
        juhl.user_id,
        juhl.lable_type,
        juhl.household_id
        FROM
        jczz_user_house_label juhl
        LEFT JOIN jczz_house jh ON juhl.house_code = jh.house_code
        LEFT JOIN jczz_grid jg on jg.id= jh.grid_id
        LEFT JOIN blade_region br on br.code = jg.community_code
        <where>
            juhl.lable_type = 1
            and juhl.color = #{userHouseLabelVO.color}
            and juhl.label_id = #{userHouseLabelVO.labelId}
            and juhl.household_id is not null
            <if test="userHouseLabelVO.taskRange != null ">and br.code like concat(#{userHouseLabelVO.taskRange},'%')
            </if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
@@ -22,6 +22,7 @@
import org.springblade.modules.house.entity.UserHouseLabelEntity;
import org.springblade.modules.house.excel.UserHouseLabelExcel;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.modules.house.vo.UserHouseLabelVO;
import java.util.List;
@@ -102,4 +103,11 @@
     * @return
     */
    IPage<HouseholdLabelVO> followStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel);
    /**
     * 查询对应的label集合信息
     * @param userHouseLabelVO
     * @return
     */
    List<UserHouseLabelEntity> getUserHouseLabelList(UserHouseLabelVO userHouseLabelVO);
}
src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
@@ -29,6 +29,7 @@
import org.springblade.modules.house.mapper.UserHouseLabelMapper;
import org.springblade.modules.house.service.IUserHouseLabelService;
import org.springblade.modules.house.vo.HouseholdLabelVO;
import org.springblade.modules.house.vo.UserHouseLabelVO;
import org.springblade.modules.label.entity.LabelEntity;
import org.springblade.modules.label.service.ILabelService;
import org.springblade.modules.label.service.impl.LabelServiceImpl;
@@ -155,4 +156,9 @@
    public List<UserHouseLabelEntity> getLabelList(String labelName) {
        return baseMapper.getLabelList(labelName);
    }
    @Override
    public List<UserHouseLabelEntity> getUserHouseLabelList(UserHouseLabelVO userHouseLabelVO) {
        return baseMapper.getUserHouseLabelList(userHouseLabelVO);
    }
}
src/main/java/org/springblade/modules/place/controller/PlaceController.java
@@ -385,4 +385,15 @@
    public R getNearbyPlaceList(@RequestParam("lat") String lat, @RequestParam("lng") String lng) {
        return R.data(placeService.getNearbyPlaceList(lat, lng));
    }
    /**
     *  更新场所的POI标签颜色
     * @param placeId
     * @param color
     * @return
     */
    @GetMapping("/updatePoiLabelColor")
    public R updatePoiLabelColor(@RequestParam("placeId") Long placeId, @RequestParam("color") String color) {
        return R.data(placeService.updatePoiLabelColor(placeId, color));
    }
}
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -1152,7 +1152,9 @@
        jp.universal_account
        from
        jczz_place jp
        LEFT JOIN jczz_place_poi_label jppl ON jppl.place_id = jp.id
        LEFT JOIN jczz_place_poi_label jppl ON jppl.place_id = jp.id and jppl.type = 3
        LEFT JOIN jczz_grid jg on jg.id = jp.grid_id
        LEFT JOIN blade_region br on br.code = jg.community_code
        <where>
            <if test="place.id != null "> and id = #{place.id}</if>
            <if test="place.houseCode != null  and place.houseCode != ''"> and house_code = #{place.houseCode}</if>
@@ -1188,7 +1190,9 @@
            <if test="place.noExplosionCategory != null "> and no_explosion_category = #{place.noExplosionCategory}</if>
            <if test="place.principalAccount != null "> and principal_account = #{place.principalAccount}</if>
            <if test="place.universalAccount != null "> and universal_account = #{place.universalAccount}</if>
            <if test="place.poiCodes != null "> and jppl.poi_code = #{place.poiCodes}</if>
            <if test="place.placeSmallLabel != null "> and jppl.poi_code = #{place.placeSmallLabel}</if>
            <if test="place.color != null "> and jppl.color = #{place.color}</if>
            <if test="place.taskRange != null "> and br.code like concat(#{place.taskRange},'%') </if>
        </where>
    </select>
src/main/java/org/springblade/modules/place/service/IPlaceService.java
@@ -229,4 +229,12 @@
     * @return
     */
    List<PlaceVO> getNearbyPlaceList(String lat, String lng);
    /**
     * 更新场所颜色
     * @param placeId
     * @param color
     * @return
     */
    boolean updatePoiLabelColor(Long placeId, String color);
}
src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
@@ -1861,6 +1861,7 @@
    /**
     *  查询附近场所
     *
     * @param lat
     * @param lng
     * @return
@@ -1869,4 +1870,24 @@
    public List<PlaceVO> getNearbyPlaceList(String lat, String lng) {
        return baseMapper.getNearbyPlaceList(lat, lng);
    }
    /**
     * 更新场所颜色
     *
     * @param placeId
     * @param color
     * @return
     */
    @Override
    public boolean updatePoiLabelColor(Long placeId, String color) {
        List<PlacePoiLabel> list = placePoiLabelService.list(Wrappers.<PlacePoiLabel>lambdaQuery()
            .eq(PlacePoiLabel::getPlaceId, placeId).eq(PlacePoiLabel::getType, 3));
        for (PlacePoiLabel placePoiLabel : list) {
            if (null != placePoiLabel) {
                placePoiLabel.setColor(color);
                return placePoiLabelService.updateById(placePoiLabel);
            }
        }
        return false;
    }
}
src/main/java/org/springblade/modules/place/vo/PlaceVO.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.place.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import liquibase.pro.packaged.S;
@@ -177,6 +178,15 @@
    @ApiModelProperty(value = "标签id集合")
    private List<String> poiCodeList ;
    /** 分类id */
    @ApiModelProperty(value = "分类id", example = "")
    private Integer placeLabel;
    /** 分类id */
    @ApiModelProperty(value = "分类id", example = "")
    private Integer placeSmallLabel;
    /**
     * 房屋绑定
     */
@@ -187,4 +197,7 @@
     */
    private List<PlacePractitionerEntity> placePractitioner = new ArrayList<>();
    @ApiModelProperty(value = "任务范围", example = "")
    private String taskRange;
}
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -27,8 +27,8 @@
        br.district_code regionCode,
        br.village_code neiCode,
        br.town_code streetCode,
        jp.principal as realName,
        jp.principal_phone as phone,
        jp.principal AS realName,
        jp.principal_phone AS phone,
        jp.nine_type,
        jp.front_type,
        jp.place_name,
@@ -45,14 +45,22 @@
        jt.source,
        jt.is_deleted,
        jt.house_code,
        jppl.color,
        jc.category_name,
        jt.report_type
        FROM
        jczz_task jt
        LEFT JOIN jczz_place jp ON jt.house_code=jp.house_code and jp.is_deleted = 0
        LEFT JOIN blade_user bu on bu.id = jt.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_grid jg on jg.grid_code = jp.grid_code and jg.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jg.community_code
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN jczz_place jp ON jt.house_code = jp.house_code
        AND jp.is_deleted = 0
        LEFT JOIN blade_user bu ON bu.id = jt.create_user
        AND bu.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
        AND jg.is_deleted = 0
        LEFT JOIN blade_region br ON br.CODE = jg.community_code
        LEFT JOIN jczz_police_affairs_grid jpag ON jp.jw_grid_code = jpag.jw_grid_code
        AND jpag.is_deleted = 0
        LEFT JOIN jczz_place_poi_label jppl on jppl.place_id = jp.id and jppl.type = 3
        LEFT JOIN jczz_category jc on jc.category_no = jppl.poi_code
        <where>
            <if test="isAdministrator==2">
                <choose>
src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml
@@ -39,7 +39,7 @@
    <!--自定义分页查询-->
    <select id="selectTaskPlaceSelfCheckPage" resultMap="taskPlaceSelfCheckResultMap">
        select jpc.*,
        jp.id jpid,
        jp.id placeId,
        jp.place_name,
        jp.location,
        jg.grid_name,
@@ -51,7 +51,8 @@
        br.village_name as communityName,
        bu.`name`,
        jpe.legal_tel,
        jpe.legal_person
        jpe.legal_person,
        jppl.color
        FROM jczz_task_place_self_check jpc
        LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code and jp.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
@@ -59,8 +60,10 @@
        LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
        LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN jczz_place_poi_label jppl on jppl.place_id = jp.id
        <where>
            and jp.house_code is not null
            and jppl.type = 3
            <if test="place.id != null ">and jpc.id = #{place.id}</if>
            <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
            <if test="place.taskName != null  and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
src/main/java/org/springblade/modules/task/service/impl/SelfExaminationTaskHandler.java
@@ -1,6 +1,9 @@
package org.springblade.modules.task.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.binlog.listener.BinlogListenerMixed;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@@ -23,6 +26,7 @@
@Component("SelfExaminationTaskHandler")
public class SelfExaminationTaskHandler implements TaskHandle {
    private static final Logger logger = LoggerFactory.getLogger(SelfExaminationTaskHandler.class);
    @Autowired
    private IPlaceService placeService;
@@ -35,12 +39,16 @@
            Query query = new Query();
            IPage<PlaceVO> page = Condition.getPage(query);
            PlaceVO placeVO = new PlaceVO();
            placeVO.setPoiCodes(customTask.getPlaceLabel().toString());
            placeVO.setPlaceLabel(customTask.getPlaceLabel());
            placeVO.setPlaceSmallLabel(customTask.getPlaceSmallLabel());
            placeVO.setNineType(customTask.getNineType());
            placeVO.setColor(customTask.getLabelColor());
            placeVO.setTaskRange(customTask.getTaskRange());
            IPage<PlaceVO> placePage = placeService.getPlacePage(page, placeVO);
            ITaskService iTaskService = SpringUtils.getBean(ITaskService.class);
            // 计算总页数
            long pages = placePage.getPages();
            System.out.println("总页数:" + pages);
            for (int i = 1; i <= pages; i++) {
                page = Condition.getPage(query);
                page.setCurrent(i);
@@ -48,7 +56,7 @@
                placePage.getRecords().forEach(place -> {
                    TaskEntity taskEntity = new TaskEntity();
                    taskEntity.setType(1);
                    taskEntity.setName("自查");
                    taskEntity.setName(customTask.getName());
                    taskEntity.setCreateTime(new Date());
                    taskEntity.setHouseCode(place.getHouseCode());
                    taskEntity.setReportType(7);
@@ -62,6 +70,7 @@
                    taskPlaceSelfCheck.setHouseCode(place.getHouseCode());
                    taskPlaceSelfCheck.setPlaceName(place.getPlaceName());
                    taskPlaceSelfCheck.setStatus(4);
                    taskPlaceSelfCheck.setType("1");
                    taskPlaceSelfCheckService.save(taskPlaceSelfCheck);
                    // taskPlaceSelfCheckList.add(taskPlaceSelfCheck);
                });
src/main/java/org/springblade/modules/task/service/impl/VisitingTaskHandler.java
@@ -6,6 +6,7 @@
import org.springblade.modules.grid.service.IGridWorkLogService;
import org.springblade.modules.house.entity.UserHouseLabelEntity;
import org.springblade.modules.house.service.IUserHouseLabelService;
import org.springblade.modules.house.vo.UserHouseLabelVO;
import org.springblade.modules.task.service.TaskHandle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -28,18 +29,23 @@
    public void taskHandle(CustomTaskEntity customTask) {
        System.out.println("走访任务");
        // 查询有标签的颜色的人
        List<UserHouseLabelEntity> list = userHouseLabelService.list(Wrappers.<UserHouseLabelEntity>lambdaQuery()
            .eq(UserHouseLabelEntity::getLableType, 1)
            .eq(UserHouseLabelEntity::getLabelId, customTask.getLabelId())
            .eq(UserHouseLabelEntity::getColor, customTask.getLabelColor())
            .isNotNull(UserHouseLabelEntity::getHouseholdId));
        // List<UserHouseLabelEntity> list = userHouseLabelService.list(Wrappers.<UserHouseLabelEntity>lambdaQuery()
        //     .eq(UserHouseLabelEntity::getLableType, 1)
        //     .eq(UserHouseLabelEntity::getLabelId, customTask.getLabelId())
        //     .eq(UserHouseLabelEntity::getColor, customTask.getLabelColor())
        //     .isNotNull(UserHouseLabelEntity::getHouseholdId));
        UserHouseLabelVO userHouseLabelVO = new UserHouseLabelVO();
        userHouseLabelVO.setLabelId(customTask.getLabelId().longValue());
        userHouseLabelVO.setColor(customTask.getLabelColor());
        userHouseLabelVO.setTaskRange(customTask.getTaskRange());
        List<UserHouseLabelEntity> list =    userHouseLabelService.getUserHouseLabelList(userHouseLabelVO);
        List<GridWorkLogEntity> gridWorkLogEntities = new ArrayList<>();
        list.forEach(userHouseLabelEntity -> {
            // 创建任务
            GridWorkLogEntity gridWorkLogEntity = new GridWorkLogEntity();
            gridWorkLogEntity.setType(1);
            gridWorkLogEntity.setType(2);
            gridWorkLogEntity.setHouseholdId(userHouseLabelEntity.getHouseholdId());
            gridWorkLogEntity.setPersonType(1);
            gridWorkLogEntity.setPersonType(customTask.getLabelId());
            gridWorkLogEntity.setSource(2);
            gridWorkLogEntity.setStatus(1);
            gridWorkLogEntities.add(gridWorkLogEntity);
src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java
@@ -106,4 +106,11 @@
    // 社区编号
    @ApiModelProperty(value = "社区编号", example = "")
    private String communityCode;
    @ApiModelProperty(value = "颜色", example = "")
    private String color;
    @ApiModelProperty(value = "场所id", example = "")
    private Long placeId;
}
src/main/java/org/springblade/modules/task/vo/TaskVO.java
@@ -87,5 +87,11 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date returnTime;
    @ApiModelProperty(value = "颜色")
    private String color;
    @ApiModelProperty(value = "分类名称")
    private String categoryName;
}
src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
@@ -28,9 +28,6 @@
    @Autowired
    private ITaskService taskService;
    @Autowired
    private EcOrderService ecOrderService;
    /**
     * 三色定时任务
     */
@@ -75,25 +72,6 @@
    }
    /**
     * 创建校园安全发送短信定时任务 0 15 0 * * ?
     */
    @XxlJob("ehjbJobHandler")
    public void ehjbJobHandler (){
        XxlJobHelper.log("开始执行任务...E呼即办定时任务");
        // 创建居住证发送短信定时任务
        EcOrderParamDTO ecOrderParamDTO = new EcOrderParamDTO();
        // 获取当前日期时间
        LocalDateTime now = LocalDateTime.now();
        // 获取前一天的开始时间
        LocalDateTime yesterdayStart = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MIN);
        // 获取前一天的结束时间
        LocalDateTime yesterdayEnd = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MAX);
        ecOrderParamDTO.setEndTime(yesterdayEnd.format(DateUtil.DATETIME_FORMATTER));
        ecOrderParamDTO.setStartTime(yesterdayStart.format(DateUtil.DATETIME_FORMATTER));
        boolean result = ecOrderService.SynchronizeData(ecOrderParamDTO);
        XxlJobHelper.log("任务响应结果..." + result);
        XxlJobHelper.log("E呼即办定时任务-结束自动创建任务...");
    }
}
src/main/java/org/springblade/xxljob/jobhandler/SynchronizationEhjb.java
New file
@@ -0,0 +1,53 @@
package org.springblade.xxljob.jobhandler;
import cn.hutool.core.date.DatePattern;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.modules.eCallEventTwo.dto.EcOrderParamDTO;
import org.springblade.modules.eCallEventTwo.service.EcOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
@Component
public class SynchronizationEhjb {
    @Autowired
    private EcOrderService ecOrderService;
    @XxlJob("ehjbJobHandler")
    public void ehjbJobHandler() {
        String param = XxlJobHelper.getJobParam();
        XxlJobHelper.log("开始执行任务..." + param);
        // 校园安全检查
        // 根据类型创建任务
        XxlJobHelper.log("开始执行任务...E呼即办定时任务");
        LocalDateTime localDateTime;
        if (StringUtils.isNotBlank(param)) {
            // 时间字符串转LocalDateTime
            localDateTime = cn.hutool.core.date.DateUtil.parseLocalDateTime(param, DatePattern.NORM_DATETIME_PATTERN);
        } else {
            // 获取当前日期时间
            localDateTime = LocalDateTime.now();
        }
        // 创建居住证发送短信定时任务
        EcOrderParamDTO ecOrderParamDTO = new EcOrderParamDTO();
        // 获取前一天的开始时间
        LocalDateTime yesterdayStart = localDateTime.minus(1, ChronoUnit.DAYS).with(LocalTime.MIN);
        // 获取前一天的结束时间
        LocalDateTime yesterdayEnd = localDateTime.minus(1, ChronoUnit.DAYS).with(LocalTime.MAX);
        ecOrderParamDTO.setEndTime(yesterdayEnd.format(DateUtil.DATETIME_FORMATTER));
        ecOrderParamDTO.setStartTime(yesterdayStart.format(DateUtil.DATETIME_FORMATTER));
        boolean result = ecOrderService.SynchronizeData(ecOrderParamDTO);
        XxlJobHelper.log("任务响应结果..." + result);
        XxlJobHelper.log("E呼即办定时任务-结束自动创建任务...");
    }
}