linwe
2023-11-09 44ac9427f3c44ce39a5bb5eeaa353f2944b92f51
标签报事
15 files modified
242 ■■■■■ changed files
src/main/java/org/springblade/common/constant/DictConstant.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskBailReportingEventEntity.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskHotelReportingEntity.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskService.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/DictConstant.java
@@ -35,4 +35,14 @@
    String FLOW_CATEGORY_CODE = "flow_category";
    String HOTEL_SECURITY= "旅馆安全";
    String DA_JIN_DIAN= "打金店";
    String USED_MOBILE_PHONES= "二手手机";
    String USED_CAR= "二手汽车";
    String BAIL_PENDING_TRIAL= "取保候审";
}
src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java
@@ -89,7 +89,7 @@
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入taskBailReportingEvent")
    public R save(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) {
        return R.status(taskBailReportingEventService.save(taskBailReportingEvent));
        return R.status(taskBailReportingEventService.saveBailReporting(taskBailReportingEvent));
    }
    /**
@@ -99,7 +99,7 @@
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskBailReportingEvent")
    public R update(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) {
        return R.status(taskBailReportingEventService.updateById(taskBailReportingEvent));
        return R.status(taskBailReportingEventService.updateBailReporting(taskBailReportingEvent));
    }
    /**
src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java
@@ -89,7 +89,7 @@
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入taskHotelReporting")
    public R save(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) {
        return R.status(taskHotelReportingService.save(taskHotelReporting));
        return R.status(taskHotelReportingService.saveHotelReporting(taskHotelReporting));
    }
    /**
@@ -99,7 +99,7 @@
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskHotelReporting")
    public R update(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) {
        return R.status(taskHotelReportingService.updateById(taskHotelReporting));
        return R.status(taskHotelReportingService.updateHotelReporting(taskHotelReporting));
    }
    /**
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
@@ -89,7 +89,7 @@
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入taskLabelReportingEvent")
    public R save(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) {
        return R.status(taskLabelReportingEventService.save(taskLabelReportingEvent));
        return R.status(taskLabelReportingEventService.saveReportingEven(taskLabelReportingEvent));
    }
    /**
@@ -99,7 +99,7 @@
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskLabelReportingEvent")
    public R update(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) {
        return R.status(taskLabelReportingEventService.updateById(taskLabelReportingEvent));
        return R.status(taskLabelReportingEventService.updateLabelReporting(taskLabelReportingEvent));
    }
    /**
src/main/java/org/springblade/modules/task/entity/TaskBailReportingEventEntity.java
@@ -17,12 +17,14 @@
package org.springblade.modules.task.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 取保候审任务 实体类
@@ -55,7 +57,7 @@
     * 自查人姓名
     */
    @ApiModelProperty(value = "自查人姓名")
    private Integer checkUserId;
    private Long checkUserId;
    /**
     * 自查人姓名
     */
@@ -75,6 +77,8 @@
     * 确认时间
     */
    @ApiModelProperty(value = "确认时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;
    /**
     * 确认用户ID
@@ -100,6 +104,8 @@
     * 申请时间
     */
    @ApiModelProperty(value = "申请时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;
    /**
     * 外出原因
@@ -130,6 +136,8 @@
     * 出发-当前时间
     */
    @ApiModelProperty(value = "出发-当前时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 出发-报备位置
@@ -145,6 +153,8 @@
     * 到达-当前时间
     */
    @ApiModelProperty(value = "到达-当前时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reachTime;
    /**
     * 到达-报备位置
@@ -160,6 +170,8 @@
     * 返回-当前时间
     */
    @ApiModelProperty(value = "返回-当前时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date returnTime;
    /**
     * 返回-报备位置
src/main/java/org/springblade/modules/task/entity/TaskHotelReportingEntity.java
@@ -17,12 +17,14 @@
package org.springblade.modules.task.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 旅馆安全自查任务 实体类
@@ -65,12 +67,14 @@
     * 自查时间
     */
    @ApiModelProperty(value = "自查时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkTime;
    /**
     * 自查人姓名
     */
    @ApiModelProperty(value = "自查人姓名")
    private Integer checkUserId;
    private Long checkUserId;
    /**
     * 自查人姓名
     */
@@ -145,6 +149,8 @@
     * 确认时间
     */
    @ApiModelProperty(value = "确认时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;
    /**
     * 确认用户ID
src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java
@@ -17,6 +17,7 @@
package org.springblade.modules.task.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -24,6 +25,7 @@
import java.lang.Double;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 打金店报事 实体类
@@ -61,12 +63,14 @@
     * 发生时间
     */
    @ApiModelProperty(value = "发生时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date happenTime;
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Integer userId;
    private Long userId;
    /**
     * 身份证图片URLS
     */
@@ -96,6 +100,8 @@
     * 确认时间
     */
    @ApiModelProperty(value = "确认时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;
    /**
     * 位置
src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.task.service;
import liquibase.pro.packaged.B;
import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
import org.springblade.modules.task.vo.TaskBailReportingEventVO;
import org.springblade.core.mp.base.BaseService;
@@ -39,4 +40,7 @@
    IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent);
    Boolean saveBailReporting(TaskBailReportingEventEntity taskBailReportingEvent);
    Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent);
}
src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java
@@ -38,5 +38,12 @@
     */
    IPage<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage<TaskHotelReportingVO> page, TaskHotelReportingVO taskHotelReporting);
    /**
     * 保存酒店自查任务
     * @param taskHotelReporting
     * @return
     */
    boolean saveHotelReporting(TaskHotelReportingEntity taskHotelReporting);
    Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting);
}
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
@@ -39,4 +39,7 @@
    IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent);
    Boolean saveReportingEven(TaskLabelReportingEventEntity taskLabelReportingEvent);
    Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent);
}
src/main/java/org/springblade/modules/task/service/ITaskService.java
@@ -16,10 +16,10 @@
 */
package org.springblade.modules.task.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.task.entity.TaskEntity;
import org.springblade.modules.task.vo.TaskVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 任务表 服务类
@@ -38,5 +38,27 @@
     */
    IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task);
    /**
     * 新增任务
     *
     * @param type
     * @param name
     * @param frequency
     * @param remark
     * @param createUser
     * @return
     */
    Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser);
    /**
     * @param type
     * @param name
     * @param frequency
     * @param remark
     * @param updateUser
     * @param id
     * @return
     */
    public Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status);
}
src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java
@@ -16,13 +16,18 @@
 */
package org.springblade.modules.task.service.impl;
import org.springblade.common.constant.DictConstant;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskBailReportingEventVO;
import org.springblade.modules.task.mapper.TaskBailReportingEventMapper;
import org.springblade.modules.task.service.ITaskBailReportingEventService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import javax.annotation.Resource;
/**
 * 取保候审任务 服务实现类
@@ -33,10 +38,31 @@
@Service
public class TaskBailReportingEventServiceImpl extends BaseServiceImpl<TaskBailReportingEventMapper, TaskBailReportingEventEntity> implements ITaskBailReportingEventService {
    @Resource
    private ITaskService taskService;
    @Override
    public IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent) {
        return page.setRecords(baseMapper.selectTaskBailReportingEventPage(page, taskBailReportingEvent));
    }
    @Override
    public Boolean saveBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) {
        Long aLong = taskService.saveTask(1, DictConstant.BAIL_PENDING_TRIAL, 3, "", AuthUtil.getUserId());
        if (aLong > 0) {
            taskBailReportingEvent.setTaskId(aLong);
            taskBailReportingEvent.setCheckUserId(AuthUtil.getUserId());
            return baseMapper.insert(taskBailReportingEvent) > 0 ? true : false;
        }
        return false;
    }
    @Override
    public Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) {
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskBailReportingEvent.getTaskId(), taskBailReportingEvent.getStatus());
        if (aLong > 0) {
            return baseMapper.updateById(taskBailReportingEvent) > 0 ? true : false;
        }
        return false;
    }
}
src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java
@@ -16,13 +16,18 @@
 */
package org.springblade.modules.task.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.common.constant.DictConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.task.entity.TaskHotelReportingEntity;
import org.springblade.modules.task.vo.TaskHotelReportingVO;
import org.springblade.modules.task.mapper.TaskHotelReportingMapper;
import org.springblade.modules.task.service.ITaskHotelReportingService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskHotelReportingVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import javax.annotation.Resource;
/**
 * 旅馆安全自查任务 服务实现类
@@ -33,10 +38,33 @@
@Service
public class TaskHotelReportingServiceImpl extends BaseServiceImpl<TaskHotelReportingMapper, TaskHotelReportingEntity> implements ITaskHotelReportingService {
    @Resource
    private ITaskService taskService;
    @Override
    public IPage<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage<TaskHotelReportingVO> page, TaskHotelReportingVO taskHotelReporting) {
        return page.setRecords(baseMapper.selectTaskHotelReportingPage(page, taskHotelReporting));
    }
    @Override
    public boolean saveHotelReporting(TaskHotelReportingEntity taskHotelReporting) {
        Long aLong = taskService.saveTask(1, DictConstant.HOTEL_SECURITY, 2, "", AuthUtil.getUserId());
        if (aLong > 0) {
            taskHotelReporting.setTaskId(aLong);
            taskHotelReporting.setCheckUserId(AuthUtil.getUserId());
            return baseMapper.insert(taskHotelReporting) > 0 ? true : false;
        }
        return false;
    }
    @Override
    public Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting) {
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskHotelReporting.getTaskId(), taskHotelReporting.getStatus());
        if (aLong > 0) {
            return baseMapper.updateById(taskHotelReporting) > 0 ? true : false;
        }
        return false;
    }
}
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -16,13 +16,18 @@
 */
package org.springblade.modules.task.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.common.constant.DictConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import org.springblade.modules.task.mapper.TaskLabelReportingEventMapper;
import org.springblade.modules.task.service.ITaskLabelReportingEventService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import javax.annotation.Resource;
/**
 * 打金店报事 服务实现类
@@ -33,10 +38,47 @@
@Service
public class TaskLabelReportingEventServiceImpl extends BaseServiceImpl<TaskLabelReportingEventMapper, TaskLabelReportingEventEntity> implements ITaskLabelReportingEventService {
    @Resource
    private ITaskService taskService;
    @Override
    public IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent) {
        return page.setRecords(baseMapper.selectTaskLabelReportingEventPage(page, taskLabelReportingEvent));
    }
    @Override
    public Boolean saveReportingEven(TaskLabelReportingEventEntity taskLabelReportingEvent) {
        String name;
        switch (taskLabelReportingEvent.getEventType()) {
            case "1":
                name = DictConstant.DA_JIN_DIAN;
                break;
            case "2":
                name = DictConstant.USED_MOBILE_PHONES;
                break;
            case "3":
                name = DictConstant.USED_CAR;
                break;
            default:
                name = "";
        }
        Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId());
        if (aLong > 0) {
            taskLabelReportingEvent.setTaskId(aLong);
            taskLabelReportingEvent.setUserId(AuthUtil.getUserId());
            return baseMapper.insert(taskLabelReportingEvent) > 0 ? true : false;
        }
        return false;
    }
    @Override
    public Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) {
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(),
            taskLabelReportingEvent.getTaskId(), taskLabelReportingEvent.getStatus());
        if (aLong > 0) {
            return baseMapper.updateById(taskLabelReportingEvent) > 0 ? true : false;
        }
        return false;
    }
}
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -16,13 +16,15 @@
 */
package org.springblade.modules.task.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.task.entity.TaskEntity;
import org.springblade.modules.task.vo.TaskVO;
import org.springblade.modules.task.mapper.TaskMapper;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.task.vo.TaskVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.Date;
/**
 * 任务表 服务实现类
@@ -38,5 +40,39 @@
        return page.setRecords(baseMapper.selectTaskPage(page, task));
    }
    /**
     * 新增任务
     *
     * @param type
     * @param name
     * @param frequency
     * @param remark
     * @param createUser
     * @return
     */
    @Override
    public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser) {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setType(type);
        taskEntity.setName(name);
        taskEntity.setFrequency(frequency);
        taskEntity.setRemark(remark);
        taskEntity.setCreateTime(new Date());
        taskEntity.setCreateUser(createUser);
        return baseMapper.insert(taskEntity) > 0 ? taskEntity.getId() : 0;
    }
    @Override
    public Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status) {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setId(id);
        taskEntity.setType(type);
        taskEntity.setName(name);
        taskEntity.setFrequency(frequency);
        taskEntity.setRemark(remark);
        taskEntity.setUpdateTime(new Date());
        taskEntity.setUpdateUser(updateUser);
        taskEntity.setStatus(status);
        return baseMapper.updateById(taskEntity) > 0 ? 1L : 0;
    }
}